mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
issue: #40532 - start timeticksync at rootcoord if the streaming service is not available - stop timeticksync if the streaming service is available - open a read-only wal if some nodes in cluster is not upgrading to 2.6 - allow to open read-write wal after all nodes in cluster is upgrading to 2.6 --------- Signed-off-by: chyezh <chyezh@outlook.com>
30 lines
500 B
Go
30 lines
500 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(OptStreamingCatalog(
|
|
mock_metastore.NewMockStreamingCoordCataLog(t),
|
|
))
|
|
})
|
|
}
|
|
|
|
func TestInitForTest(t *testing.T) {
|
|
InitForTest()
|
|
Release()
|
|
}
|