Fix some datanode instance not stopped in unit tests (#21385)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/21389/head
congqixia 2022-12-26 16:59:30 +08:00 committed by GitHub
parent 5d044c4f29
commit 3c9840d6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -185,6 +185,7 @@ func TestDataNode(t *testing.T) {
t.Run("Test BackGroundGC", func(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
node := newIDLEDataNodeMock(ctx, schemapb.DataType_Int64)
defer node.Stop()
vchanNameCh := make(chan string)
node.clearSignal = vchanNameCh

View File

@ -45,6 +45,7 @@ func TestFlowGraphManager(t *testing.T) {
defer etcdCli.Close()
node := newIDLEDataNodeMock(ctx, schemapb.DataType_Int64)
defer node.Stop()
node.SetEtcdClient(etcdCli)
err = node.Init()
require.Nil(t, err)