milvus/tests/integration
Xu Tong 9166011c4a
Add float16 vector (#25852)
Signed-off-by: Writer-X <1256866856@qq.com>
2023-09-08 10:03:16 +08:00
..
bulkinsert Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
crossclusterrouting Improve the retry of the rpc client (#26795) 2023-09-06 17:43:14 +08:00
getvector Add float16 vector (#25852) 2023-09-08 10:03:16 +08:00
hellomilvus Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
indexstat Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
insert Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
jsonexpr Support json contains feature (#25384) 2023-08-11 17:09:30 +08:00
rangesearch Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
refreshconfig Decouple basetable and componentparam (#26725) 2023-09-05 10:31:48 +08:00
upsert Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
meta_watcher_test.go Remove calc_distance (#25663) 2023-07-18 14:23:20 +08:00
meta_watcher.go Fix integration tests logic (#24063) 2023-05-15 14:45:21 +08:00
minicluster_test.go Seperate integration test package to resolve interference between cases (#24331) 2023-05-23 17:51:25 +08:00
minicluster.go Decouple basetable and componentparam (#26725) 2023-09-05 10:31:48 +08:00
OWNERS Trigger main workflow when integration test changed (#24020) 2023-05-11 09:51:19 +08:00
querynodev2_test.go Fix integration test not wait for index built (#24037) 2023-05-12 09:51:25 +08:00
README.md Add README for integration test (#24441) 2023-05-26 15:55:27 +08:00
suite.go Seperate integration test package to resolve interference between cases (#24331) 2023-05-23 17:51:25 +08:00
util_index.go Fix CollectionNotExists when search and retrieve vector (#26524) 2023-08-22 17:06:22 +08:00
util_insert.go Add float16 vector (#25852) 2023-09-08 10:03:16 +08:00
util_query.go Add float16 vector (#25852) 2023-09-08 10:03:16 +08:00
util_schema.go Add float16 vector (#25852) 2023-09-08 10:03:16 +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.