donghao526 commented on code in PR #3296:
URL: https://github.com/apache/kvrocks/pull/3296#discussion_r2633251609


##########
tests/gocase/unit/type/tdigest/tdigest_test.go:
##########
@@ -54,17 +55,42 @@ type tdigestInfo struct {
 }
 
 func toTdigestInfo(t *testing.T, value interface{}) tdigestInfo {
-       require.IsType(t, map[interface{}]interface{}{}, value)
-       v := value.(map[interface{}]interface{})
-       return tdigestInfo{
-               Compression:       v["Compression"].(int64),
-               Capacity:          v["Capacity"].(int64),
-               MergedNodes:       v["Merged nodes"].(int64),
-               UnmergedNodes:     v["Unmerged nodes"].(int64),
-               MergedWeight:      v["Merged weight"].(int64),
-               UnmergedWeight:    v["Unmerged weight"].(int64),
-               Observations:      v["Observations"].(int64),
-               TotalCompressions: v["Total compressions"].(int64),
+       // Handle both RESP2 (map) and RESP3 (array) formats
+       switch v := value.(type) {
+       case map[interface{}]interface{}:

Review Comment:
   Got it. I've reverted this part since the RESP3 test only applies to byrank 
commands. It was an oversight that I didn't remove it before.



-- 
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