milvus/tests/integration
congqixia c0317ce672
fix: Wait check node id goroutine in case of data race (#36302)
Resolves: #36301

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-09-19 10:41:10 +08:00
..
alias
balance feat: Support stats task to sort segment by PK (#35054) 2024-09-02 14:19:03 +08:00
bloomfilter
channel_balance feat: Support stats task to sort segment by PK (#35054) 2024-09-02 14:19:03 +08:00
compaction feat: Support stats task to sort segment by PK (#35054) 2024-09-02 14:19:03 +08:00
coorddownsearch
coordrecovery
crossclusterrouting feat: Support stats task to sort segment by PK (#35054) 2024-09-02 14:19:03 +08:00
datanode
expression
getvector
hellomilvus
httpserver enhance: support httpv1/v2 throttle and add it for httpV2(#35350) (#35470) 2024-08-20 16:16:55 +08:00
hybridsearch fix: empty result when having only one subReq(#36098) (#36128) 2024-09-10 14:25:07 +08:00
import feat: Introduce stats task for import (#35868) 2024-09-15 15:17:08 +08:00
indexstat
insert
jsonexpr
levelzero fix: [skip e2e]unstable l0 it (#35612) 2024-08-26 18:53:04 +08:00
materialized_view
null_data fix: not append valid data when transfer to insert record (#36027) 2024-09-06 14:53:04 +08:00
ops enhance: Mark query node as read only after suspend (#35492) 2024-08-20 14:02:54 +08:00
partialsearch
partitionkey
querynode
rangesearch
ratelimit fix: Fix DB limiter nodes are mistakenly cleaned up (#35991) 2024-09-05 17:35:04 +08:00
rbac fix: Fix privilege group hasn't been register for validate (#35937) 2024-09-05 15:35:04 +08:00
refreshconfig
replicas enhance: enable to set load config in cluster level (#35169) 2024-08-07 12:38:21 +08:00
rg
rollingupgrade
sealpolicies enhance: Add depguard rules to ban deprecated proto lib (#35140) 2024-08-01 10:01:49 +08:00
sparse enhance: Allow empty sparse row (#34700) 2024-08-16 14:14:54 +08:00
streaming feat: Support stats task to sort segment by PK (#35054) 2024-09-02 14:19:03 +08:00
target enhance: support httpv1/v2 throttle and add it for httpV2(#35350) (#35470) 2024-08-20 16:16:55 +08:00
upsert fix: upsert result use the previous pk (#34672) 2024-07-31 15:25:51 +08:00
OWNERS
README.md enhance: use docker compose instead of docker-compose (#35208) 2024-08-02 19:32:32 +08:00
meta_watcher.go
meta_watcher_test.go
minicluster_v2.go enhance: add IT for rate limit using db properties (#35930) 2024-09-04 14:37:04 +08:00
querynodev2_test.go
suite.go fix: Wait check node id goroutine in case of data race (#36302) 2024-09-19 10:41:10 +08:00
util_collection.go
util_index.go
util_insert.go enhance: add some integration test in null (#35599) 2024-08-21 17:44:56 +08:00
util_query.go
util_schema.go

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.