milvus/tests/integration
cqy123456 47f767cf32
enhance: remove float16 in 2.3 branch (#31720)
issue: https://github.com/milvus-io/milvus/issues/31696

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2024-03-30 10:49:13 +08:00
..
alias feat: [Cherry-pick] Implement DescribeAlias and ListAliases interfaces (#29896) 2024-01-12 16:30:51 +08:00
bulkinsert fix: Decoupling importing segment from flush process (#30402) (#30439) 2024-02-03 12:59:14 +08:00
crossclusterrouting fix: nil ptr is used as nil interface in grpc client (#30755) 2024-02-23 10:08:54 +08:00
getvector enhance: remove float16 in 2.3 branch (#31720) 2024-03-30 10:49:13 +08:00
hellomilvus Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
indexstat Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
insert Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
jsonexpr enhance: [Cherry-pick] pre-allocate result FieldData space to reduce growslice (#29726) (#29866) 2024-01-11 17:59:01 +08:00
rangesearch Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
refreshconfig Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
upsert Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
OWNERS Trigger main workflow when integration test changed (#24020) 2023-05-11 09:51:19 +08:00
README.md Add README for integration test (#24441) 2023-05-26 15:55:27 +08:00
meta_watcher.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
meta_watcher_test.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
minicluster.go enhance: [Cherry-pick] Moving etcd client into session (#27069) (#28996) 2023-12-07 16:22:34 +08:00
minicluster_test.go Decoupling client and server API in types interface (#27186) 2023-09-26 09:57:25 +08:00
querynodev2_test.go Fix integration test not wait for index built (#24037) 2023-05-12 09:51:25 +08:00
suite.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
util_index.go Add ChunkCache: support get vector from storage (#26142) 2023-09-15 10:21:20 +08:00
util_insert.go enhance: remove float16 in 2.3 branch (#31720) 2024-03-30 10:49:13 +08:00
util_query.go enhance: remove float16 in 2.3 branch (#31720) 2024-03-30 10:49:13 +08:00
util_schema.go enhance: remove float16 in 2.3 branch (#31720) 2024-03-30 10:49:13 +08:00

README.md

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.