Fix unittest for rootcoord, should filter out timetick msg first (#7490)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/7498/head
zhenshan.cao 2021-09-06 11:52:41 +08:00 committed by GitHub
parent af7b7537f0
commit 86afde4598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -419,9 +419,10 @@ func TestRootCoord(t *testing.T) {
dmlStream.Start()
// get CreateCollectionMsg
msgPack, ok := <-dmlStream.Chan()
assert.True(t, ok)
createMsg, ok := (msgPack.Msgs[0]).(*msgstream.CreateCollectionMsg)
// get CreateCollectionMsg
msgs := getNotTtMsg(ctx, 1, dmlStream.Chan())
assert.Equal(t, 1, len(msgs))
createMsg, ok := (msgs[0]).(*msgstream.CreateCollectionMsg)
assert.True(t, ok)
createMeta, err := core.MetaTable.GetCollectionByName(collName, 0)
assert.Nil(t, err)