From 86f37688b14ecab3e9ae332ed25e380518baefaa Mon Sep 17 00:00:00 2001 From: Songlin Yang Date: Thu, 7 Dec 2023 04:31:59 +0800 Subject: [PATCH] test(*): flaky TestCoordinator_RebalanceCluster (#400) Use Steady status cause flaky test Signed-off-by: Soren Yang --- coordinator/impl/coordinator_e2e_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coordinator/impl/coordinator_e2e_test.go b/coordinator/impl/coordinator_e2e_test.go index 95503770..f05cb4ee 100644 --- a/coordinator/impl/coordinator_e2e_test.go +++ b/coordinator/impl/coordinator_e2e_test.go @@ -553,7 +553,9 @@ func TestCoordinator_RebalanceCluster(t *testing.T) { assert.Eventually(t, func() bool { for _, ns := range coordinator.ClusterStatus().Namespaces { for _, shard := range ns.Shards { - if shard.Status != model.ShardStatusSteadyState { + // Use Term to detect for EnsembleChange have done, we cann't use status + // because it always be Steady when EnsembleChange. + if shard.Term != 1 { return false } }