Fix datarace of flow_graph_manager_test.go in package datanode (#23043)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/23055/head
zhenshan.cao 2023-03-28 10:42:00 +08:00 committed by GitHub
parent d6bfe8fbb9
commit e3c3c949c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 25 deletions

View File

@ -210,7 +210,6 @@ func TestFlowGraphManager(t *testing.T) {
fm.dropAll() fm.dropAll()
const channelPrefix = "by-dev-rootcoord-dml-test-fg-mgr-execute-" const channelPrefix = "by-dev-rootcoord-dml-test-fg-mgr-execute-"
for _, test := range tests { for _, test := range tests {
t.Run(test.testName, func(t *testing.T) {
var baseParams = &Params.BaseTable var baseParams = &Params.BaseTable
baseParams.Save(Params.DataNodeCfg.MemoryWatermark.Key, fmt.Sprintf("%f", test.watermark)) baseParams.Save(Params.DataNodeCfg.MemoryWatermark.Key, fmt.Sprintf("%f", test.watermark))
baseParams.Save(Params.DataNodeCfg.MemoryForceSyncEnable.Key, fmt.Sprintf("%t", true)) baseParams.Save(Params.DataNodeCfg.MemoryForceSyncEnable.Key, fmt.Sprintf("%t", true))
@ -235,7 +234,6 @@ func TestFlowGraphManager(t *testing.T) {
assert.True(t, ok) assert.True(t, ok)
assert.Equal(t, needToSync, fg.(*dataSyncService).channel.(*ChannelMeta).needToSync.Load()) assert.Equal(t, needToSync, fg.(*dataSyncService).channel.(*ChannelMeta).needToSync.Load())
} }
})
} }
}) })
} }