fix flaky test by ignoring order of elements (#14611)

As far as I can tell, the order doesn't matter here, we wan to test that
the slice has the elements with the higher `UnixTime` value
This commit is contained in:
Roberto Dip 2023-10-18 11:07:00 -03:00 committed by GitHub
parent 9ec2efb979
commit 45236e23d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -818,7 +818,7 @@ func TestGetMostRecentResults(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
results := getMostRecentResults(tt.input)
assert.Equal(t, tt.expected, results)
assert.ElementsMatch(t, tt.expected, results)
})
}
}