Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def pump(_pid, receiver, _args, _dl):
try:
async with receiver:
while time.time() < deadline:
batch = await receiver.receive(timeout=1)
batch = await receiver.receive(timeout=3)
size = len(batch)
total += size
iteration += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ async def test_send_with_invalid_hostname_async(invalid_hostname, connstr_receiv
@pytest.mark.asyncio
async def test_receive_with_invalid_hostname_async(invalid_hostname):
client = EventHubClient.from_connection_string(invalid_hostname, network_tracing=False)
sender = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await receiver.receive(timeout=3)


@pytest.mark.liveTest
Expand All @@ -55,9 +55,9 @@ async def test_send_with_invalid_key_async(invalid_key, connstr_receivers):
@pytest.mark.asyncio
async def test_receive_with_invalid_key_async(invalid_key):
client = EventHubClient.from_connection_string(invalid_key, network_tracing=False)
sender = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await receiver.receive(timeout=3)


@pytest.mark.liveTest
Expand All @@ -74,9 +74,9 @@ async def test_send_with_invalid_policy_async(invalid_policy, connstr_receivers)
@pytest.mark.asyncio
async def test_receive_with_invalid_policy_async(invalid_policy):
client = EventHubClient.from_connection_string(invalid_policy, network_tracing=False)
sender = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await receiver.receive(timeout=3)


@pytest.mark.liveTest
Expand Down