@@ -489,20 +489,6 @@ async def test_client_no_touch(self, r: redis.Redis):
489
489
with pytest .raises (TypeError ):
490
490
await r .client_no_touch ()
491
491
492
- @skip_if_server_version_lt ("7.2.0" )
493
- @pytest .mark .onlycluster
494
- async def test_waitaof (self , r ):
495
- # must return a list of 2 elements
496
- assert len (await r .waitaof (0 , 0 , 0 )) == 2
497
- assert len (await r .waitaof (1 , 0 , 0 )) == 2
498
- assert len (await r .waitaof (1 , 0 , 1000 )) == 2
499
-
500
- # value is out of range, value must between 0 and 1
501
- with pytest .raises (exceptions .ResponseError ):
502
- await r .waitaof (2 , 0 , 0 )
503
- with pytest .raises (exceptions .ResponseError ):
504
- await r .waitaof (- 1 , 0 , 0 )
505
-
506
492
async def test_config_get (self , r : redis .Redis ):
507
493
data = await r .config_get ()
508
494
assert "maxmemory" in data
@@ -1821,9 +1807,11 @@ async def test_zrank(self, r: redis.Redis):
1821
1807
async def test_zrank_withscore (self , r : redis .Redis ):
1822
1808
await r .zadd ("a" , {"a1" : 1 , "a2" : 2 , "a3" : 3 , "a4" : 4 , "a5" : 5 })
1823
1809
assert await r .zrank ("a" , "a1" ) == 0
1824
- assert await r .rank ("a" , "a2" ) == 1
1810
+ assert await r .zrank ("a" , "a2" ) == 1
1825
1811
assert await r .zrank ("a" , "a6" ) is None
1826
- assert await r .zrank ("a" , "a3" , withscore = True ) == [2 , "3" ]
1812
+ assert_resp_response (
1813
+ r , await r .zrank ("a" , "a3" , withscore = True ), [2 , b"3" ], [2 , 3.0 ]
1814
+ )
1827
1815
assert await r .zrank ("a" , "a6" , withscore = True ) is None
1828
1816
1829
1817
async def test_zrem (self , r : redis .Redis ):
@@ -1920,7 +1908,9 @@ async def test_zrevrank_withscore(self, r: redis.Redis):
1920
1908
assert await r .zrevrank ("a" , "a1" ) == 4
1921
1909
assert await r .zrevrank ("a" , "a2" ) == 3
1922
1910
assert await r .zrevrank ("a" , "a6" ) is None
1923
- assert await r .zrevrank ("a" , "a3" , withscore = True ) == [2 , "3" ]
1911
+ assert_resp_response (
1912
+ r , await r .zrevrank ("a" , "a3" , withscore = True ), [2 , b"3" ], [2 , 3.0 ]
1913
+ )
1924
1914
assert await r .zrevrank ("a" , "a6" , withscore = True ) is None
1925
1915
1926
1916
async def test_zscore (self , r : redis .Redis ):
@@ -2877,13 +2867,15 @@ async def test_xinfo_consumers(self, r: redis.Redis):
2877
2867
info = await r .xinfo_consumers (stream , group )
2878
2868
assert len (info ) == 2
2879
2869
expected = [
2880
- {"name" : consumer1 .encode (), "pending" : 1 , "inactive" : 2 },
2881
- {"name" : consumer2 .encode (), "pending" : 2 , "inactive" : 2 },
2870
+ {"name" : consumer1 .encode (), "pending" : 1 },
2871
+ {"name" : consumer2 .encode (), "pending" : 2 },
2882
2872
]
2883
2873
2884
- # we can't determine the idle time, so just make sure it's an int
2874
+ # we can't determine the idle and inactive time, so just make sure it's an int
2885
2875
assert isinstance (info [0 ].pop ("idle" ), int )
2886
2876
assert isinstance (info [1 ].pop ("idle" ), int )
2877
+ assert isinstance (info [0 ].pop ("inactive" ), int )
2878
+ assert isinstance (info [1 ].pop ("inactive" ), int )
2887
2879
assert info == expected
2888
2880
2889
2881
@skip_if_server_version_lt ("5.0.0" )
0 commit comments