topology_coordinator: cdc_generation_publisher_fiber injection: make handlers share messages

In the following commit, we add a test that needs to block the CDC
generation publisher's loop twice. We allow it in this commit by
making handlers of the `cdc_generation_publisher_fiber` injection
share messages. From now on, unblocking every step of the loop will
require sending a new message from the test.

This change breaks the test already using the
`cdc_generation_publisher_fiber` injection, so we adjust the test.
This commit is contained in:
Patryk Jędrzejczak
2024-03-18 15:37:24 +01:00
parent c5c4cc7d00
commit f45aebeee2
2 changed files with 3 additions and 2 deletions

View File

@@ -111,7 +111,8 @@ async def test_multiple_unpublished_cdc_generations(request, manager: ManagerCli
return None
# Check that all 4 CDC generations are eventually published in the correct order.
await handler.message()
for _ in range(4):
await handler.message()
while len(gen_timestamps) < 4:
# We prefer to detect CDC generation publications one-by-one, because it increases our chances of catching
# potential bugs like incorrect order of publications. Therefore, we use very short period - 0.01 s.