File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88format :
99 uv run ruff format src tests
1010 uv run ruff check src tests --fix
11+
12+ test :
13+ uv run pytest tests
Original file line number Diff line number Diff line change @@ -268,3 +268,30 @@ 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 ()
287+ response = await client .send_rpc (
288+ "test_service" ,
289+ "rpc_method" ,
290+ "Bob" ,
291+ serialize_request ,
292+ deserialize_response ,
293+ deserialize_error ,
294+ timedelta (seconds = 20 ),
295+ )
296+
297+ assert response == "Hello, Bob!"
You can’t perform that action at this time.
0 commit comments