mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
Fix bug: data race caused by read and write Params.DataNodeCfg.NodeID (#16478)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
parent
a5ac637ba5
commit
eae0747f14
@ -80,6 +80,7 @@ func TestDataNode(t *testing.T) {
|
|||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
err = node.Start()
|
err = node.Start()
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
|
defer node.Stop()
|
||||||
|
|
||||||
node.chunkManager = storage.NewLocalChunkManager(storage.RootPath("/tmp/lib/milvus"))
|
node.chunkManager = storage.NewLocalChunkManager(storage.RootPath("/tmp/lib/milvus"))
|
||||||
Params.DataNodeCfg.NodeID = 1
|
Params.DataNodeCfg.NodeID = 1
|
||||||
@ -399,6 +400,7 @@ func TestWatchChannel(t *testing.T) {
|
|||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
err = node.Start()
|
err = node.Start()
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
|
defer node.Stop()
|
||||||
err = node.Register()
|
err = node.Register()
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user