milvus/tests/integration/suite_options.go
Zhen Ye ecb24e7232
enhance: use multi-process framework in integration test (#42976)
issue: #41609

- add env `MILVUS_NODE_ID_FOR_TESTING` to set up a node id for milvus
process.
- add env `MILVUS_CONFIG_REFRESH_INTERVAL` to set up the refresh
interval of paramtable.
- Init paramtable when calling `paramtable.Get()`.
- add new multi process framework for integration test.
- change all integration test into multi process.
- merge some test case into one suite to speed up it.
- modify some test, which need to wait for issue #42966, #42685.
- remove the waittssync for delete collection to fix issue: #42989

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-06-30 14:22:43 +08:00

24 lines
745 B
Go

package integration
type clusterSuiteOption struct {
dropAllCollectionsWhenTestTearDown bool
notResetDeploymentWhenTestTearDown bool
}
type ClusterSuiteOption func(o *clusterSuiteOption)
// WithDropAllCollectionsWhenTestTearDown drop all collections when test tear down
func WithDropAllCollectionsWhenTestTearDown() ClusterSuiteOption {
return func(o *clusterSuiteOption) {
o.dropAllCollectionsWhenTestTearDown = true
}
}
// WithoutResetDeploymentWhenTestTearDown reset deployment when test tear down
// the reset operation will keep only 1 default component for milvus cluster.
func WithoutResetDeploymentWhenTestTearDown() ClusterSuiteOption {
return func(o *clusterSuiteOption) {
o.notResetDeploymentWhenTestTearDown = true
}
}