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 @@ -121,7 +121,7 @@ async def test_receive_from_invalid_partitions_async(connection_str):
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
receiver = client.create_consumer(consumer_group="$default", partition_id=p, event_position=EventPosition("-1"))
with pytest.raises(ConnectError):
await receiver.receive(timeout=10)
await receiver.receive(timeout=5)
await receiver.close()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def test_send_with_long_interval_async(connstr_receivers, sleep):
for r in receivers:
if not sleep: # if sender sleeps, the receivers will be disconnected. destroy connection to simulate
r._handler._connection._conn.destroy()
received.extend(r.receive(timeout=1))
received.extend(r.receive(timeout=3))
assert len(received) == 2
assert list(received[0].body)[0] == b"A single event"

Expand Down
3 changes: 1 addition & 2 deletions sdk/eventhub/azure-eventhubs/tests/test_negative.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def test_non_existing_entity_receiver(connection_str):
receiver.close()



@pytest.mark.liveTest
def test_receive_from_invalid_partitions_sync(connection_str):
partitions = ["XYZ", "-1", "1000", "-"]
Expand All @@ -117,7 +116,7 @@ def test_receive_from_invalid_partitions_sync(connection_str):
receiver = client.create_consumer(consumer_group="$default", partition_id=p, event_position=EventPosition("-1"))
try:
with pytest.raises(ConnectError):
receiver.receive(timeout=10)
receiver.receive(timeout=5)
finally:
receiver.close()

Expand Down