Skip to content

fix: fix multiple flaky tests in CI#48396

Open
liliu-z wants to merge 1 commit intomasterfrom
fix/flaky-tests-batch-20260319
Open

fix: fix multiple flaky tests in CI#48396
liliu-z wants to merge 1 commit intomasterfrom
fix/flaky-tests-batch-20260319

Conversation

@liliu-z
Copy link
Member

@liliu-z liliu-z commented Mar 19, 2026

Summary

  • proxy.TestProxy/search: use defer for Params.Reset to prevent MustUsePartitionKey config pollution when test fails early
  • etcd.TestEtcdKV/TestRevisionBytes: use GreaterOrEqual instead of Equal for etcd revision comparison since revision is a global counter shared across concurrent tests
  • querycoord.TestCatalogSuite/TestReplica: add error checks for SaveReplica/ReleaseReplica calls and clean up etcd data in TearDownTest
  • mixcoord/client and proxy/client tests: replace timing-dependent context.WithTimeout(10ms) + time.Sleep(20ms) with context.WithDeadline(time.Now().Add(-1s)) to create already-expired contexts, eliminating race conditions on busy CI machines

issue: #39726

Test plan

  • CI build-ut-ciloop passes
  • No new test failures introduced
  • Existing flaky tests stabilized

🤖 Generated with Claude Code

1. proxy.TestProxy/search: use defer for Params.Reset to prevent
   MustUsePartitionKey config pollution when test fails early

2. etcd.TestEtcdKV/TestRevisionBytes: use GreaterOrEqual instead of
   Equal for etcd revision comparison since revision is a global
   counter shared across concurrent tests

3. querycoord.TestCatalogSuite/TestReplica: add error checks for
   SaveReplica/ReleaseReplica calls and clean up etcd data in
   TearDownTest to prevent state leakage

4. mixcoord/client and proxy/client tests: replace timing-dependent
   context.WithTimeout(10ms) + time.Sleep(20ms) with
   context.WithDeadline(time.Now().Add(-1s)) to create already-expired
   contexts, eliminating race conditions on busy CI machines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Li Liu <li.liu@zilliz.com>
@sre-ci-robot sre-ci-robot added the do-not-merge/work-in-progress Don't merge even CI passed. label Mar 19, 2026
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liliu-z

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot added size/L Denotes a PR that changes 100-499 lines. approved labels Mar 19, 2026
@mergify mergify bot added dco-passed DCO check passed. kind/bug Issues or changes related a bug labels Mar 19, 2026
@liliu-z liliu-z marked this pull request as ready for review March 19, 2026 17:19
@sre-ci-robot sre-ci-robot removed the do-not-merge/work-in-progress Don't merge even CI passed. label Mar 19, 2026
@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: New ci-v2 system is enabled for this PR.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-build-all // for ci-v2/build-all (multi-arch builds)
  • /ci-rerun-buildenv // for ci-v2/build-env (build milvus-env builder images)
  • /ci-rerun-ut-integration // for ci-v2/ut-integration, will rerun ci-v2/build
  • /ci-rerun-ut-go // for ci-v2/ut-go, will rerun ci-v2/build
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp, will rerun ci-v2/build
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm
  • /ci-rerun-e2e-default // for ci-v2/e2e-default
  • /ci-rerun-ciloop // for ci-v2/ciloop (build + unit tests in one pipeline)
  • /ci-rerun-gosdk // for ci-v2/go-sdk (Go SDK E2E tests, AMD)
  • /ci-rerun-gosdk-arm // for ci-v2/go-sdk-arm (Go SDK E2E tests, ARM)

If you have any questions or requests, please contact @zhikunyao.

@mergify
Copy link
Contributor

mergify bot commented Mar 19, 2026

@liliu-z go-sdk check failed, comment rerun go-sdk can trigger the job again.

@mergify mergify bot added the ci-passed label Mar 19, 2026
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.77%. Comparing base (d8f0811) to head (e56f7fd).

❌ Your project check has failed because the head coverage (74.77%) is below the target coverage (77.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #48396      +/-   ##
==========================================
+ Coverage   74.76%   74.77%   +0.01%     
==========================================
  Files        1480     1480              
  Lines      245265   245265              
==========================================
+ Hits       183373   183406      +33     
+ Misses      53611    53582      -29     
+ Partials     8281     8277       -4     
Components Coverage Δ
Client 78.65% <ø> (ø)
Core ∅ <ø> (∅)
Go 75.66% <ø> (+0.01%) ⬆️
see 33 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved ci-passed dco-passed DCO check passed. kind/bug Issues or changes related a bug size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants