milvus/tests/integration
yihao.dai 35532a3e7d
fix: Fill stats log id and check validity (#33477)
1. Fill log ID of stats log from import
2. Add a check to validate the log ID before writing to meta

issue: https://github.com/milvus-io/milvus/issues/33476

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-06-05 11:17:56 +08:00
..
alias feat: Implement DescribeAlias and ListAliases interfaces (#29641) 2024-01-11 19:12:51 +08:00
balance enhance: Enable channel exclusive balance policy (#32911) 2024-05-10 17:27:31 +08:00
bloomfilter enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405) 2024-05-31 17:49:45 +08:00
channel_balance fix: [skip e2e] Make channel balance test accept flushing segments (#32229) 2024-04-15 11:27:18 +08:00
compaction enhance: Decouple compaction from shard (#33138) 2024-05-24 09:07:41 +08:00
coorddownsearch fix: [skip e2e]Increase graceful time to ensure that bounded search executing normally (#31064) 2024-03-07 10:53:00 +08:00
coordrecovery enhance: Save collection targets by batches (#31616) 2024-03-27 00:09:08 +08:00
crossclusterrouting enhance: Simplify cross cluster routing integration test (#29873) 2024-01-11 14:00:52 +08:00
datanode fix: Skip unstable compaction test it (#31116) 2024-03-08 10:23:00 +08:00
expression enhance: Support more relational operators for binary expressions (#30902) 2024-03-01 16:57:00 +08:00
getvector enhance: Add get_vector unittest for float16 & bfloat16 (#32153) 2024-04-23 16:15:23 +08:00
hellomilvus feat: [Sparse Float Vector] added some integration tests (#31062) 2024-04-10 19:57:18 +08:00
hybridsearch feat: [Sparse Float Vector] added some integration tests (#31062) 2024-04-10 19:57:18 +08:00
import fix: Fill stats log id and check validity (#33477) 2024-06-05 11:17:56 +08:00
indexstat feat: [Sparse Float Vector] added some integration tests (#31062) 2024-04-10 19:57:18 +08:00
insert feat: [Sparse Float Vector] added some integration tests (#31062) 2024-04-10 19:57:18 +08:00
jsonexpr feat: Support for multiple forms of JSON (#31052) 2024-03-11 19:55:02 +08:00
materialized_view enhance: gather materialized view search info once per request (#31996) 2024-04-11 15:21:19 +08:00
partialsearch test: support segment release in integration test (#31190) 2024-04-09 11:39:17 +08:00
partitionkey enhance: change default partition num to 16 when using partition key (#32950) 2024-05-13 14:19:31 +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
replicas enhance: Enable database level replica num and resource groups for loading collection (#33052) 2024-05-29 10:59:43 +08:00
rg enhance: declarative resource group api (#31930) 2024-04-15 08:13:19 +08:00
rollingupgrade enhance: Add restful api for devops to execute rolling upgrade (#29998) 2024-03-27 16:15:19 +08:00
sparse fix: remove flaky sparse integration test (#32767) 2024-05-06 19:19:29 +08:00
target enhance: Speed up target recovery after query coord restart (#31240) 2024-03-15 14:19:03 +08:00
upsert fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
watchcompatibility feat: datacoord/node watch based on rpc (#32036) 2024-05-07 15:49:30 +08:00
meta_watcher_test.go fix: Repair integration test framework (#28308) 2023-11-24 10:26:23 +08:00
meta_watcher.go fix: Fill stats log id and check validity (#33477) 2024-06-05 11:17:56 +08:00
minicluster_v2.go feat: datacoord/node watch based on rpc (#32036) 2024-05-07 15:49:30 +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 feat: add more operation detail info for better allocation (#30438) 2024-03-28 06:33:11 +08:00
util_collection.go enhance: declarative resource group api (#31930) 2024-04-15 08:13:19 +08:00
util_index.go feat: [Sparse Float Vector] added some integration tests (#31062) 2024-04-10 19:57:18 +08:00
util_insert.go enhance: unify data generation test APIs (#32955) 2024-05-14 14:33:33 +08:00
util_query.go feat: Bulk insert support fp16/bf16 (#32157) 2024-04-22 10:05:22 +08:00
util_schema.go feat: [Sparse Float Vector] added some integration tests (#31062) 2024-04-10 19:57:18 +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.