milvus/tests/integration
cai.zhang 41f1e6dcad
enhance:Add integration test for searching when coord down (#30717)
issue: #29772

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2024-03-01 17:07:00 +08:00
..
alias feat: Implement DescribeAlias and ListAliases interfaces (#29641) 2024-01-11 19:12:51 +08:00
bulkinsert fix: Decoupling importing segment from flush process (#30402) 2024-02-03 13:01:12 +08:00
coorddownsearch enhance:Add integration test for searching when coord down (#30717) 2024-03-01 17:07:00 +08:00
coordrecovery enhance: decrease coordinator init time (#29822) 2024-02-05 14:00:12 +08:00
crossclusterrouting enhance: Simplify cross cluster routing integration test (#29873) 2024-01-11 14:00:52 +08:00
datanode fix: Clear DN unkown compaction tasks (#30850) 2024-03-01 11:31:00 +08:00
expression enhance: Support more relational operators for binary expressions (#30902) 2024-03-01 16:57:00 +08:00
getvector Add float16 approve for multi-type part (#28427) 2024-01-11 15:48:51 +08:00
hellomilvus fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
hybridsearch fix: create new HybridSearch request in case of data race (#29771) 2024-01-09 09:54:48 +08:00
indexstat fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
insert fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
jsonexpr enhance: support pattern matching on json field (#30779) 2024-02-28 18:31:00 +08:00
querynode enhance: add configurable memory index load predict memory usage factor (#30561) 2024-03-01 15:23:00 +08:00
rangesearch fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
refreshconfig Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
upsert fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
meta_watcher_test.go fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
meta_watcher.go fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
minicluster_v2.go enhance: add configurable memory index load predict memory usage factor (#30561) 2024-03-01 15:23:00 +08:00
OWNERS Trigger main workflow when integration test changed (#24020) 2023-05-11 09:51:19 +08:00
querynodev2_test.go fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
README.md Add README for integration test (#24441) 2023-05-26 15:55:27 +08:00
suite.go enhance: make integration test case timeout configurable (#30073) 2024-01-18 12:22:54 +08:00
util_index.go feat: Support multiple vector search (#29433) 2024-01-08 15:34:48 +08:00
util_insert.go test: removing deprecated code (#30484) 2024-02-06 10:46:01 +08:00
util_query.go enhance:Add integration test for searching when coord down (#30717) 2024-03-01 17:07:00 +08:00
util_schema.go Add float16 approve for multi-type part (#28427) 2024-01-11 15:48:51 +08:00

Integration test

This folder contains the integration test for Milvus components.

How to run integration test locally

Integration test still need some thirdparty components to start:

cd [milvus-folder]/deployments/docker/dev && docker-compose up -d

Run following script to start the full integration test:

cd [milvus-folder]
make milvus # milvus needs to be compiled to make cpp build ready
./scripts/run_intergration_test.sh

If you want to run single test case, you could execute command like this example

# mq, etcd, minio ready before
cd [milvus-folder]
source scripts/setenv.sh
cd tests/integration/[testcase-folder]/
go test -run "$testCaseName^" -testify.m "$subTestifyCaseName^" -race -v

Using suite

MiniClusterandMiniClusterSuite` provides lots of comment preset tool function to execute intergration test.

It is recommend to add a new test with testify/suite


import (
    // ...
    "github.com/milvus-io/milvus/tests/integration"
)

type NewSuite struct {
    integration.MiniClusterSuite
}


// Setups and teardowns, optional if no custom logic needed
// example to suite setup & teardown, same logic applies to test setup&teardown

func (s *NewSuite) SetupSuite() {
    s.MiniClusterSuite.SetupSuite()
    // customized setup
}

func (s *NewSuite) TearDownSuite() {
    s.MiniClusterSuite.TearDownSuite()
    // customized teardown
}

New folder for each new scenario

It's a known issue that integration test cases run in same process might affect due to some singleton component not fully cleaned.

As a temp solution, test cases are separated into different packages to run independently.