mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix bug for IndexCoord ut (#18148)
Signed-off-by: Cai.Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
44e59d6318
commit
0c883b215b
@ -250,17 +250,13 @@ func TestIndexBuilder(t *testing.T) {
|
||||
|
||||
for {
|
||||
ib.taskMutex.Lock()
|
||||
if len(ib.tasks) == 1 {
|
||||
if len(ib.tasks) == 1 && indexTaskInProgress == ib.tasks[5] {
|
||||
ib.taskMutex.Unlock()
|
||||
break
|
||||
}
|
||||
ib.taskMutex.Unlock()
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
|
||||
ib.taskMutex.RLock()
|
||||
assert.Equal(t, indexTaskInProgress, ib.tasks[5])
|
||||
ib.taskMutex.RUnlock()
|
||||
})
|
||||
|
||||
ib.Stop()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user