Skip to content

Use docker container for integration test#443

Merged
sre-ci-robot merged 1 commit intomilvus-io:masterfrom
yhmo:mm
Mar 19, 2026
Merged

Use docker container for integration test#443
sre-ci-robot merged 1 commit intomilvus-io:masterfrom
yhmo:mm

Conversation

@yhmo
Copy link
Collaborator

@yhmo yhmo commented Feb 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 4, 2026 09:25
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yhmo

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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces Testcontainers-based integration testing infrastructure to enable automated testing against a real Milvus instance. The changes replace manual server setup with containerized testing that automatically manages the Milvus container lifecycle.

Changes:

  • Added Python-based testcontainers management script for starting/stopping Milvus containers
  • Introduced C++ Google Test environment to manage container lifecycle across all integration tests
  • Refactored test assertions to use a new ExpectStatusOK helper for better error reporting
  • Updated CI workflows to include integration testing and removed lint exclusion for test directory
  • Removed tests requiring special server configurations (auth and TLS)

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
test/st/milvus_container.py New Python script to manage Milvus container lifecycle using testcontainers-python
test/st/MilvusContainerEnv.h New C++ Google Test environment that orchestrates container start/stop around test runs
test/st/Main.cpp Updated to register the MilvusContainerEnv global test environment
test/st/MilvusServerTest.h Added ExpectStatusOK helper and connection status logging
test/st/MilvusServerTest.cpp Implemented ExpectStatusOK helper with diagnostic output
test/st/TestSearch.cpp Migrated from EXPECT_TRUE to ExpectStatusOK, fixed collection name initialization
test/st/TestSearchWithBinaryVectors.cpp Migrated from EXPECT_TRUE to ExpectStatusOK, fixed collection name initialization
test/st/TestGeneric.cpp Migrated from EXPECT_TRUE to ExpectStatusOK, added version logging
test/st/TestCollection.cpp Migrated from EXPECT_TRUE to ExpectStatusOK
test/st/TestConnectWithUser.cpp Removed (auth testing requires special server setup)
test/st/TestConnectWithTls.cpp Removed (TLS testing requires special server setup)
scripts/install_deps.sh Added testcontainers and docker Python packages to Ubuntu and Fedora dependency installation
scripts/lint_exclusions.txt Removed test directory exclusion to enable linting of test code
.github/workflows/main.yaml Added integration testing step to CI pipeline

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 90 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.05%. Comparing base (a0592aa) to head (42cc8ec).
⚠️ Report is 80 commits behind head on master.

Files with missing lines Patch % Lines
src/impl/utils/DmlUtils.cpp 2.17% 45 Missing ⚠️
src/impl/types/Function.cpp 0.00% 8 Missing ⚠️
src/impl/utils/DqlUtils.cpp 22.22% 7 Missing ⚠️
src/impl/types/HybridSearchArguments.cpp 0.00% 6 Missing ⚠️
src/impl/types/SearchIteratorImpl.cpp 0.00% 6 Missing ⚠️
src/impl/types/SearchRequestBase.cpp 0.00% 6 Missing ⚠️
src/impl/MilvusClientV2Impl.cpp 0.00% 4 Missing ⚠️
src/impl/types/EmbeddingList.cpp 50.00% 2 Missing ⚠️
src/impl/types/IteratorArguments.cpp 0.00% 2 Missing ⚠️
src/impl/types/QueryArguments.cpp 66.66% 2 Missing ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #443      +/-   ##
==========================================
- Coverage   53.47%   46.05%   -7.42%     
==========================================
  Files          52      236     +184     
  Lines        4432    12382    +7950     
  Branches        0     1241    +1241     
==========================================
+ Hits         2370     5703    +3333     
- Misses       2062     6585    +4523     
- Partials        0       94      +94     
Files with missing lines Coverage Δ
src/impl/MilvusConnection.cpp 85.02% <ø> (+24.86%) ⬆️
src/impl/types/SearchArguments.cpp 50.52% <100.00%> (-36.98%) ⬇️
src/impl/utils/TypeUtils.cpp 79.27% <100.00%> (ø)
src/include/milvus/MilvusClientV2.h 0.00% <ø> (ø)
src/impl/types/SearchResults.cpp 82.71% <0.00%> (-17.29%) ⬇️
src/impl/utils/ExtraParamUtils.h 47.05% <50.00%> (ø)
src/impl/types/EmbeddingList.cpp 36.13% <50.00%> (ø)
src/impl/types/IteratorArguments.cpp 79.16% <0.00%> (ø)
src/impl/types/QueryArguments.cpp 63.73% <66.66%> (-36.27%) ⬇️
src/impl/MilvusClientV2Impl.cpp 0.00% <0.00%> (ø)
... and 6 more

... and 237 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yhmo yhmo force-pushed the mm branch 7 times, most recently from 97a2d3c to 5b5576f Compare February 5, 2026 06:28
@yhmo yhmo changed the title Use Testcontainers for integration test Use docker container for integration test Feb 5, 2026
@yhmo yhmo force-pushed the mm branch 4 times, most recently from 1f06ceb to 103e3c3 Compare February 9, 2026 10:28
@yhmo yhmo force-pushed the mm branch 4 times, most recently from f024ba4 to 70937a7 Compare February 13, 2026 08:34
@yhmo yhmo force-pushed the mm branch 5 times, most recently from 72aed58 to c46e647 Compare March 18, 2026 07:37
@mergify mergify bot added the ci-passed label Mar 18, 2026
@yhmo yhmo force-pushed the mm branch 3 times, most recently from e4bd80f to de1c41a Compare March 19, 2026 02:39
Signed-off-by: yhmo <yihua.mo@zilliz.com>
@yhmo yhmo added the lgtm label Mar 19, 2026
@sre-ci-robot sre-ci-robot merged commit ce7e973 into milvus-io:master Mar 19, 2026
10 of 12 checks passed
@yhmo yhmo deleted the mm branch March 19, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants