mirror of https://github.com/milvus-io/milvus.git
Fix TestMetaCache_ExpireShardLeaderCache unit test (#22651)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/22657/head
parent
a96344b3d0
commit
d9908ff231
|
@ -834,7 +834,7 @@ func TestMetaCache_ExpireShardLeaderCache(t *testing.T) {
|
|||
assert.Eventually(t, func() bool {
|
||||
nodeInfos, err := globalMetaCache.GetShards(ctx, true, "collection1")
|
||||
assert.NoError(t, err)
|
||||
return assert.Len(t, nodeInfos["channel-1"], 2)
|
||||
return len(nodeInfos["channel-1"]) == 2
|
||||
}, 3*time.Second, 1*time.Second)
|
||||
|
||||
queryCoord.EXPECT().GetShardLeaders(mock.Anything, mock.Anything).Return(&querypb.GetShardLeadersResponse{
|
||||
|
@ -877,6 +877,6 @@ func TestMetaCache_ExpireShardLeaderCache(t *testing.T) {
|
|||
assert.Eventually(t, func() bool {
|
||||
nodeInfos, err := globalMetaCache.GetShards(ctx, true, "collection1")
|
||||
assert.NoError(t, err)
|
||||
return assert.Len(t, nodeInfos["channel-1"], 3) && assert.Len(t, nodeInfos["channel-2"], 3)
|
||||
return len(nodeInfos["channel-1"]) == 3 && len(nodeInfos["channel-2"]) == 3
|
||||
}, 3*time.Second, 1*time.Second)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue