mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-16 04:06:44 +00:00
skiplist: fix TestFindGreaterOrEqual flake (compare against largest key, not value) (#10757)
skiplist: compare against the largest key, not its value, in TestFindGreaterOrEqual
This commit is contained in:
@@ -295,10 +295,9 @@ func TestFindGreaterOrEqual(t *testing.T) {
|
||||
}
|
||||
} else {
|
||||
lastNode, _ := list.GetLargestNode()
|
||||
lastV := lastNode.GetValue()
|
||||
// It is OK, to fail, as long as f is bigger than the last element.
|
||||
if bytes.Compare(key, lastV) <= 0 {
|
||||
t.Errorf("lastV: %s\n key: %s\n\n", string(lastV), string(key))
|
||||
// It is OK, to fail, as long as the key is bigger than the largest key.
|
||||
if bytes.Compare(key, lastNode.Key) <= 0 {
|
||||
t.Errorf("largest key: %s\n key: %s\n\n", string(lastNode.Key), string(key))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user