mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
Fix wrong unittest, check whether loading collection will cause OOM (#16068)
Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
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…
x
Reference in New Issue
Block a user