File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
packages/service-library/tests/long_running_interfaces Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ async def raising_f() -> None:
6060 msg = "I always raise an error"
6161 raise RuntimeError (msg )
6262
63+ @registry .expose ()
64+ async def raising_after_sleep_f (duration : float ) -> None :
65+ await asyncio .sleep (duration )
66+ msg = "I always raise an error"
67+ raise RuntimeError (msg )
68+
6369 @registry .expose ()
6470 async def sleep_forever_f () -> None :
6571 while True : # noqa: ASYNC110
@@ -129,6 +135,17 @@ async def test_timeout_error(server: Server, client: Client):
129135 )
130136
131137
138+ async def test_timeout_during_failing_retry (server : Server , client : Client ):
139+ with pytest .raises (TimedOutError ):
140+ await client .ensure_result (
141+ "raising_after_sleep_f" ,
142+ expected_type = type (None ),
143+ timeout = timedelta (seconds = 2 ),
144+ retry_count = 100 ,
145+ duration = 1 ,
146+ )
147+
148+
132149@pytest .mark .parametrize ("retry_count" , [1 , 2 ])
133150async def test_stops_after_n_retry_attempts (
134151 server : Server , client : Client , retry_count : NonNegativeInt
You can’t perform that action at this time.
0 commit comments