mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 00:10:42 +01: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:
1 parent
d713ab49f9
commit
c2ea452b9d
1 file changed
+3
-4
@@ -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