PragmaTwice commented on code in PR #2477:
URL: https://github.com/apache/kvrocks/pull/2477#discussion_r1709169601


##########
tests/gocase/unit/search/search_test.go:
##########
@@ -88,12 +104,30 @@ func TestSearch(t *testing.T) {
                        fields := res.Val().([]interface{})[2].([]interface{})
                        if fields[0] == "a" {
                                require.Equal(t, "x,z", fields[1])
-                               require.Equal(t, "b", fields[2])
-                               require.Equal(t, "22", fields[3])
+                               if fields[2] == "c" {
+                                       require.Equal(t, "12.000000, 13.000000, 
14.000000", fields[3])
+                                       require.Equal(t, "b", fields[4])
+                                       require.Equal(t, "22", fields[5])
+                               } else if fields[2] == "b" {
+                                       require.Equal(t, "22", fields[3])
+                                       require.Equal(t, "c", fields[4])
+                                       require.Equal(t, "12.000000, 13.000000, 
14.000000", fields[5])
+                               } else {
+                                       require.Fail(t, "not started with c or 
b")
+                               }

Review Comment:
   maybe we can read them to a map and then do some check so that we don't need 
to care the order.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to