congqixia cb7f2fa6fd
enhance: Use v2 package name for pkg module (#39990)
Related to #39095

https://go.dev/doc/modules/version-numbers

Update pkg version according to golang dep version convention

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-02-22 23:15:58 +08:00

20 lines
495 B
Go

package util
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus/pkg/v2/util/paramtable"
)
func TestGetAllTopicsFromConfiguration(t *testing.T) {
paramtable.Init()
topics := GetAllTopicsFromConfiguration()
assert.Len(t, topics, 16)
paramtable.Get().CommonCfg.PreCreatedTopicEnabled.SwapTempValue("true")
paramtable.Get().CommonCfg.TopicNames.SwapTempValue("topic1,topic2,topic3")
topics = GetAllTopicsFromConfiguration()
assert.Len(t, topics, 3)
}