@@ -1495,6 +1495,7 @@ async def test_response_aggregation_timings_multiple(run_isolated, disable_dupli
14951495 with unittest .mock .patch .object (aiozc .zeroconf , "async_send" ) as send_mock :
14961496 send_mock .reset_mock ()
14971497 protocol .datagram_received (query2 .packets ()[0 ], ('127.0.0.1' , const ._MDNS_PORT ))
1498+ protocol .last_time = 0 # manually reset the last time to avoid duplicate packet suppression
14981499 await asyncio .sleep (0.2 )
14991500 calls = send_mock .mock_calls
15001501 assert len (calls ) == 1
@@ -1505,6 +1506,7 @@ async def test_response_aggregation_timings_multiple(run_isolated, disable_dupli
15051506
15061507 send_mock .reset_mock ()
15071508 protocol .datagram_received (query2 .packets ()[0 ], ('127.0.0.1' , const ._MDNS_PORT ))
1509+ protocol .last_time = 0 # manually reset the last time to avoid duplicate packet suppression
15081510 await asyncio .sleep (1.2 )
15091511 calls = send_mock .mock_calls
15101512 assert len (calls ) == 1
@@ -1515,7 +1517,9 @@ async def test_response_aggregation_timings_multiple(run_isolated, disable_dupli
15151517
15161518 send_mock .reset_mock ()
15171519 protocol .datagram_received (query2 .packets ()[0 ], ('127.0.0.1' , const ._MDNS_PORT ))
1520+ protocol .last_time = 0 # manually reset the last time to avoid duplicate packet suppression
15181521 protocol .datagram_received (query2 .packets ()[0 ], ('127.0.0.1' , const ._MDNS_PORT ))
1522+ protocol .last_time = 0 # manually reset the last time to avoid duplicate packet suppression
15191523 # The delay should increase with two packets and
15201524 # 900ms is beyond the maximum aggregation delay
15211525 # when there is no network protection delay
0 commit comments