Skip to content

Commit bf74b95

Browse files
committed
Fix potential race condition in cluster module test
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
1 parent c8548f6 commit bf74b95

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/unit/moduleapi/cluster.tcl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ start_cluster 3 0 [list config_lines $modules] {
3131
} else {
3232
fail "node 1 didn't receive DONG messages"
3333
}
34-
assert_equal 2 [count_log_message 0 "* <cluster> DONG (type 2) RECEIVED*"]
34+
wait_for_condition 50 100 {
35+
[count_log_message 0 "* <cluster> DONG (type 2) RECEIVED*"] eq 2
36+
} else {
37+
fail "node 1 didn't log 2 DONG messages"
38+
}
3539
}
3640
}
3741

0 commit comments

Comments
 (0)