mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-06 19:02:18 +08:00
issue: #33285 - add balancer implementation - add channel count fair balance policy - add channel assignment discover grpc service Signed-off-by: chyezh <chyezh@outlook.com>
33 lines
638 B
Go
33 lines
638 B
Go
package resource
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
clientv3 "go.etcd.io/etcd/client/v3"
|
|
|
|
"github.com/milvus-io/milvus/internal/mocks/mock_metastore"
|
|
)
|
|
|
|
func TestInit(t *testing.T) {
|
|
assert.Panics(t, func() {
|
|
Init()
|
|
})
|
|
assert.Panics(t, func() {
|
|
Init(OptETCD(&clientv3.Client{}))
|
|
})
|
|
assert.Panics(t, func() {
|
|
Init(OptETCD(&clientv3.Client{}))
|
|
})
|
|
Init(OptETCD(&clientv3.Client{}), OptStreamingCatalog(
|
|
mock_metastore.NewMockStreamingCoordCataLog(t),
|
|
))
|
|
|
|
assert.NotNil(t, Resource().StreamingCatalog())
|
|
assert.NotNil(t, Resource().ETCD())
|
|
}
|
|
|
|
func TestInitForTest(t *testing.T) {
|
|
InitForTest()
|
|
}
|