Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [skip e2e] Unstable integration test TestQueryCoordRestart #37681

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/integration/target/target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ func (s *TargetTestSuit) TestQueryCoordRestart() {
s.initCollection(name, 1, 2, 2, 2000)

ctx := context.Background()

info, err := s.Cluster.Proxy.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{
Base: commonpbutil.NewMsgBase(),
CollectionName: name,
Expand All @@ -156,6 +155,16 @@ func (s *TargetTestSuit) TestQueryCoordRestart() {
s.True(merr.Ok(info.GetStatus()))
collectionID := info.GetCollectionID()

// wait until all shards are ready
// cause showCollections won't just wait all collection becomes loaded, proxy will use retry to block until all shard are ready
s.Eventually(func() bool {
resp, err := s.Cluster.QueryCoord.GetShardLeaders(ctx, &querypb.GetShardLeadersRequest{
Base: commonpbutil.NewMsgBase(),
CollectionID: collectionID,
})
return err == nil && merr.Ok(resp.GetStatus()) && len(resp.Shards) == 2
}, 60*time.Second, 1*time.Second)

// trigger old coord stop
s.Cluster.StopQueryCoord()

Expand Down
Loading