Skip to content

Commit

Permalink
fix: [skip e2e] TestNodeDownOnSingleReplica has unstable result (#37288)
Browse files Browse the repository at this point in the history
issue: #37289
those test case use search to verify replica's status, but if the search
gap is 1s, the node down's effect may be fixed up by balance.

This PR remove the 1 second gap between search operation.

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 authored Nov 1, 2024
1 parent 0ac8b16 commit f190e5d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/integration/replicas/balance/replica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (s *ReplicaTestSuit) TestNodeDownOnSingleReplica() {
case <-stopSearchCh:
log.Info("stop search")
return
case <-time.After(time.Second):
default:
expr := fmt.Sprintf("%s > 0", integration.Int64Field)
nq := 10
topk := 10
Expand All @@ -131,9 +131,8 @@ func (s *ReplicaTestSuit) TestNodeDownOnSingleReplica() {

// stop qn in single replica expected got search failures
qn.Stop()
s.Eventually(func() bool {
return failCounter.Load() > 0
}, 30*time.Second, 1*time.Second)
time.Sleep(10 * time.Second)
s.True(failCounter.Load() > 0)

close(stopSearchCh)
}
Expand Down Expand Up @@ -176,7 +175,7 @@ func (s *ReplicaTestSuit) TestNodeDownOnMultiReplica() {
case <-stopSearchCh:
log.Info("stop search")
return
case <-time.After(time.Second):
default:
expr := fmt.Sprintf("%s > 0", integration.Int64Field)
nq := 10
topk := 10
Expand Down

0 comments on commit f190e5d

Please sign in to comment.