Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviewing logging/ increasing timeout error in tests / Updating pipeline to 3.13.1 #185

Merged
merged 3 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
increasing timeout error in tests
  • Loading branch information
DanielePalaia committed Apr 10, 2024
commit 895181b2e48c9d52b53a6c489c9146c94fcd97bd
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}
services:
rabbitmq-streaming:
image: rabbitmq:3.13-rc-management
image: rabbitmq:3.13.1-management
env:
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_stream advertised_host localhost"
ports:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async def test_offset_type_last(stream: str, consumer: Consumer, producer: Produ
subscriber_name="test-subscriber",
)

await wait_for(lambda: len(captured) > 0 and captured[-1] == b"4999")
await wait_for(lambda: len(captured) > 0 and captured[-1] == b"4999", 2)
assert len(captured) < len(messages)


Expand Down Expand Up @@ -195,7 +195,7 @@ async def test_offset_type_timestamp(stream: str, consumer: Consumer, producer:
callback=lambda message, message_context: captured.append(bytes(message)),
offset_specification=ConsumerOffsetSpecification(offset_type=OffsetType.TIMESTAMP, offset=now),
)
await wait_for(lambda: len(captured) > 0 and captured[0] >= b"5000")
await wait_for(lambda: len(captured) > 0 and captured[0] >= b"5000", 2)


async def test_offset_type_next(stream: str, consumer: Consumer, producer: Producer) -> None:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def test_publishing_several_messages(stream: str, producer: Producer, cons
for i in range(0, 100000):
await producer.send(stream, b"one")

await wait_for(lambda: len(captured) == 100000)
await wait_for(lambda: len(captured) == 100000, 2)


async def test_publishing_several_messages_different_streams(
Expand All @@ -93,8 +93,8 @@ async def test_publishing_several_messages_different_streams(
for i in range(0, 100000):
await producer.send(stream2, b"one")

await wait_for(lambda: len(captured_stream_1) == 100000)
await wait_for(lambda: len(captured_stream_2) == 100000)
await wait_for(lambda: len(captured_stream_1) == 100000, 2)
await wait_for(lambda: len(captured_stream_2) == 100000, 2)


async def test_publishing_sequence_subbatching_nocompression(
Expand Down
2 changes: 1 addition & 1 deletion tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def task_to_delete_connection(connection_name: str) -> None:
for connection in connections:
if connection["client_properties"]["connection_name"] == connection_name:
delete_connection(connection["name"])
await wait_for(lambda: get_connection(connection["name"]) is False)
await wait_for(lambda: get_connection(connection["name"]) is False, 2)


async def task_to_delete_stream_producer(producer: Producer, stream: str) -> None:
Expand Down
Loading