mirror of https://mirror.osredm.com/root/redis.git
Fix double inf test, use readraw to verify the protocol (#11504)
The test introduced in #11482 fail on mac: ``` *** [err]: RESP3: RM_ReplyWithDouble: inf in tests/unit/moduleapi/reply.tcl Expected 'Inf' to be equal to 'inf' (context: type eval line 6 cmd {assert_equal Inf [r rw.double inf]} proc ::test) ``` Looks like the mac platform returns inf instead of Inf in this case, this PR uses readraw to verify the protocol.
This commit is contained in:
parent
78dc292178
commit
2a2e5d416a
|
@ -33,8 +33,12 @@ start_server {tags {"modules"}} {
|
|||
assert_equal "inf" [r rw.double inf]
|
||||
assert_equal "-inf" [r rw.double -inf]
|
||||
} else {
|
||||
assert_equal Inf [r rw.double inf]
|
||||
assert_equal -Inf [r rw.double -inf]
|
||||
# TCL convert inf to different results on different platforms, e.g. inf on mac
|
||||
# and Inf on others, so use readraw to verify the protocol
|
||||
r readraw 1
|
||||
assert_equal ",inf" [r rw.double inf]
|
||||
assert_equal ",-inf" [r rw.double -inf]
|
||||
r readraw 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue