mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 22:43:15 +00:00
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:
@@ -663,7 +663,7 @@ class topology_coordinator : public endpoint_lifecycle_subscriber {
|
||||
rtlogger.info("CDC generation publisher fiber sleeps after injection");
|
||||
co_await handler.wait_for_message(std::chrono::steady_clock::now() + std::chrono::minutes{5});
|
||||
rtlogger.info("CDC generation publisher fiber finishes sleeping after injection");
|
||||
});
|
||||
}, false);
|
||||
|
||||
bool sleep = false;
|
||||
try {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user