Skip to content

Commit

Permalink
remove some duplicate sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Feb 19, 2024
1 parent 2367798 commit 8609c35
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,7 @@ async def test_tcp_connector_dns_throttle_requests(
m_resolver().resolve.return_value = dns_response()
loop.create_task(conn._resolve_host("localhost", 8080))
loop.create_task(conn._resolve_host("localhost", 8080))
await asyncio.sleep(0)
await asyncio.sleep(0)
await asyncio.sleep(0.01)
m_resolver().resolve.assert_called_once_with("localhost", 8080, family=0)


Expand All @@ -1032,10 +1031,7 @@ async def test_tcp_connector_dns_throttle_requests_exception_spread(loop: Any) -
m_resolver().resolve.side_effect = e
r1 = loop.create_task(conn._resolve_host("localhost", 8080))
r2 = loop.create_task(conn._resolve_host("localhost", 8080))
await asyncio.sleep(0)
await asyncio.sleep(0)
await asyncio.sleep(0)
await asyncio.sleep(0)
await asyncio.sleep(0.01)
assert r1.exception() == e
assert r2.exception() == e

Expand Down

0 comments on commit 8609c35

Please sign in to comment.