Skip to content

Commit

Permalink
Merge pull request redpanda-data#20818 from bharathv/rep_monitor_test
Browse files Browse the repository at this point in the history
replication_monitor/test: add diagnostic on assertion failure
  • Loading branch information
piyushredpanda authored Jul 3, 2024
2 parents 089a089 + 1d8e580 commit 7685b6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/v/raft/tests/replication_monitor_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ TEST_P_CORO(monitor_test_fixture, replication_monitor_wait) {
auto raft = node(leader).raft();

auto all = ::populate_waiters(raft, write_caching(), num_waiters());
co_await ss::sleep(2s);
co_await ss::sleep(500ms);
ASSERT_FALSE_CORO(all.available());

for (auto i = 0; i < num_waiters(); i++) {
auto result = co_await raft->replicate(
make_batches({{"k", "v"}}),
replicate_options{raft::consistency_level::quorum_ack});
ASSERT_TRUE_CORO(result.has_value());
ASSERT_TRUE_CORO(result.has_value()) << result.error();
}

co_await tests::cooperative_spin_wait_with_timeout(
Expand All @@ -86,13 +86,13 @@ TEST_P_CORO(monitor_test_fixture, truncation_detection) {

auto raft = node(leader).raft();
auto all = ::populate_waiters(raft, write_caching(), num_waiters());
co_await ss::sleep(2s);
co_await ss::sleep(500ms);
ASSERT_FALSE_CORO(all.available());

for (auto& [id, node] : nodes()) {
if (id == leader) {
node->on_dispatch(
[](model::node_id, raft::msg_type) { return ss::sleep(5s); });
[](model::node_id, raft::msg_type) { return ss::sleep(3s); });
}
}

Expand Down

0 comments on commit 7685b6d

Please sign in to comment.