File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -268,3 +268,31 @@ async def test_ignore_flood_subscription(client: Client) -> None:
268268 timedelta (seconds = 20 ),
269269 )
270270 assert response == "Hello, Alice!"
271+
272+ @pytest .mark .asyncio
273+ @pytest .mark .parametrize ("handlers" , [{** basic_rpc_method }])
274+ async def test_rpc_method_reconnect (client : Client ) -> None :
275+ response = await client .send_rpc (
276+ "test_service" ,
277+ "rpc_method" ,
278+ "Alice" ,
279+ serialize_request ,
280+ deserialize_response ,
281+ deserialize_error ,
282+ timedelta (seconds = 20 ),
283+ )
284+ assert response == "Hello, Alice!"
285+
286+ await client ._transport ._close_all_sessions (client ._transport ._get_all_sessions )
287+
288+ response = await client .send_rpc (
289+ "test_service" ,
290+ "rpc_method" ,
291+ "Bob" ,
292+ serialize_request ,
293+ deserialize_response ,
294+ deserialize_error ,
295+ timedelta (seconds = 20 ),
296+ )
297+
298+ assert response == "Hello, Bob!"
You can’t perform that action at this time.
0 commit comments