negentropy: test lists equality instead of matching elements.

This commit is contained in:
fiatjaf
2024-09-14 17:06:10 -03:00
parent 286040c4ce
commit 495c6e6e75

View File

@ -144,7 +144,7 @@ func runTestWith(t *testing.T,
haves = append(haves, item) haves = append(haves, item)
} }
slices.Sort(haves) slices.Sort(haves)
require.ElementsMatch(t, expectedHave, haves, "wrong have") require.Equal(t, expectedHave, haves, "wrong have")
}() }()
go func() { go func() {
@ -163,7 +163,7 @@ func runTestWith(t *testing.T,
havenots = append(havenots, item) havenots = append(havenots, item)
} }
slices.Sort(havenots) slices.Sort(havenots)
require.ElementsMatch(t, expectedNeed, havenots, "wrong need") require.Equal(t, expectedNeed, havenots, "wrong need")
}() }()
wg.Wait() wg.Wait()