@@ -1050,12 +1050,12 @@ def test_request_timeout():
10501050 """Test that the timeout does not throw an exception and finishes close to the actual timeout."""
10511051 zeroconf = r .Zeroconf (interfaces = ["127.0.0.1" ])
10521052 start_time = r .current_time_millis ()
1053- assert zeroconf .get_service_info ("_notfound.local." , "notthere._notfound.local." ) is None
1053+ assert zeroconf .get_service_info ("_notfound.local." , "notthere._notfound.local." , timeout = 200 ) is None
10541054 end_time = r .current_time_millis ()
10551055 zeroconf .close ()
1056- # 3000ms for the default timeout
1056+ # 200ms for the timeout passed above
10571057 # 1000ms for loaded systems + schedule overhead
1058- assert (end_time - start_time ) < 3000 + 1000
1058+ assert (end_time - start_time ) < 200 + 1000
10591059
10601060
10611061@pytest .mark .asyncio
@@ -1888,7 +1888,7 @@ def async_send(out: DNSOutgoing, addr: str | None = None, port: int = const._MDN
18881888 # patch the zeroconf send
18891889 with patch .object (aiozc .zeroconf , "async_send" , async_send ):
18901890 await aiozc .async_get_service_info (
1891- f"willnotbefound.{ type_ } " , type_ , question_type = r .DNSQuestionType .QU
1891+ f"willnotbefound.{ type_ } " , type_ , timeout = 200 , question_type = r .DNSQuestionType .QU
18921892 )
18931893
18941894 await aiozc .async_close ()
0 commit comments