Fix data race (#22171)

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
This commit is contained in:
smellthemoon 2023-02-15 15:40:33 +08:00 committed by GitHub
parent 68f146d5df
commit e20d79a8a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,10 +186,6 @@ func TestDataNode(t *testing.T) {
}) })
t.Run("Test BackGroundGC", func(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) vchanNameCh := make(chan string)
node.clearSignal = vchanNameCh node.clearSignal = vchanNameCh
go node.BackGroundGC(vchanNameCh) go node.BackGroundGC(vchanNameCh)