Remove etcd dependency for querynode ut (#20830)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/20697/head
congqixia 2022-11-25 14:45:12 +08:00 committed by GitHub
parent 7fbe0c4df2
commit 49c8ce7561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -142,7 +142,6 @@ func startEmbedEtcdServer() (*embed.Etcd, error) {
}
func TestMain(m *testing.M) {
setup()
var err error
rateCol, err = newRateCollector()
if err != nil {
@ -153,7 +152,11 @@ func TestMain(m *testing.M) {
if err != nil {
os.Exit(1)
}
defer embedetcdServer.Close()
// setup env for etcd endpoint
os.Setenv("etcd.endpoints", "127.0.0.1:8989")
setup()
exitCode := m.Run()
os.Exit(exitCode)
}