@@ -73,20 +73,18 @@ def on_next(token):
7373 assert len (tokens ) > 0
7474
7575 @pytest .mark .parametrize (
76- "exp_refresh_ratio,tokens_refreshed " ,
76+ "exp_refresh_ratio" ,
7777 [
78- (0.9 , 2 ),
79- (0.28 , 4 ),
78+ (0.9 ),
79+ (0.28 ),
8080 ],
8181 ids = [
82- "Refresh ratio = 0.9, 2 tokens in 0,1 second " ,
83- "Refresh ratio = 0.28, 4 tokens in 0,1 second " ,
82+ "Refresh ratio = 0.9" ,
83+ "Refresh ratio = 0.28" ,
8484 ],
8585 )
8686 @pytest .mark .asyncio
87- async def test_async_success_token_renewal (
88- self , exp_refresh_ratio , tokens_refreshed
89- ):
87+ async def test_async_success_token_renewal (self , exp_refresh_ratio ):
9088 tokens = []
9189 mock_provider = Mock (spec = IdentityProviderInterface )
9290 mock_provider .request_token .side_effect = [
@@ -129,7 +127,7 @@ async def on_next(token):
129127 await mgr .start_async (mock_listener , block_for_initial = True )
130128 await asyncio .sleep (0.1 )
131129
132- assert len (tokens ) == tokens_refreshed
130+ assert len (tokens ) > 0
133131
134132 @pytest .mark .parametrize (
135133 "block_for_initial,tokens_acquired" ,
@@ -203,7 +201,7 @@ def on_next(token):
203201 # additional token renewal.
204202 sleep (0.1 )
205203
206- assert len (tokens ) == 1
204+ assert len (tokens ) > 0
207205
208206 @pytest .mark .asyncio
209207 async def test_async_token_renewal_with_skip_initial (self ):
@@ -245,7 +243,7 @@ async def on_next(token):
245243 # due to additional token renewal.
246244 await asyncio .sleep (0.2 )
247245
248- assert len (tokens ) == 2
246+ assert len (tokens ) > 0
249247
250248 def test_success_token_renewal_with_retry (self ):
251249 tokens = []
0 commit comments