mirror of https://github.com/milvus-io/milvus.git
Fix wrong unittest, check whether loading collection will cause OOM (#16068)
Signed-off-by: yah01 <yang.cen@zilliz.com>pull/16068/merge
parent
78557ca6d7
commit
31c5b286da
|
@ -634,10 +634,16 @@ func TestTask_loadSegmentsTask(t *testing.T) {
|
|||
PartitionID: defaultPartitionID,
|
||||
CollectionID: defaultCollectionID,
|
||||
NumOfRows: totalRAM / int64(sizePerRecord),
|
||||
SegmentSize: totalRAM,
|
||||
},
|
||||
}
|
||||
// Reach the segment size that would cause OOM
|
||||
for node.loader.checkSegmentSize(defaultCollectionID, task.req.Infos, 1) == nil {
|
||||
task.req.Infos[0].SegmentSize *= 2
|
||||
}
|
||||
err = task.Execute(ctx)
|
||||
assert.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "OOM")
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue