Skip to content

Commit b323a06

Browse files
Ensure that the whole test state has been consumed
1 parent 916db99 commit b323a06

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/v2/fixtures.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@ async def uri_and_metadata_factory() -> UriAndMetadata[None]:
198198

199199
await driver_task
200200

201+
assert len(expected) == 0, "Unconsumed messages from 'expected'"
202+
assert messages_to_client_channel.qsize() == 0, (
203+
"Dangling messages the client has not consumed"
204+
)
205+
assert messages_from_client_channel.qsize() == 0, (
206+
"Dangling messages the processor has not consumed"
207+
)
208+
201209
messages_to_client_channel.close()
202210
messages_from_client_channel.close()
203211

0 commit comments

Comments
 (0)