Fix test_compact_cross_partition (#20547)

Signed-off-by: longjiquan <jiquan.long@zilliz.com>

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
Jiquan Long 2022-11-14 11:41:05 +08:00 committed by GitHub
parent e217b951ee
commit b11df55499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1161,8 +1161,6 @@ class TestCompactionOperation(TestcaseBase):
# create collection and partition
collection_w = self.init_collection_wrap(name=cf.gen_unique_str(prefix), shards_num=1)
partition_w = self.init_partition_wrap(collection_wrap=collection_w)
collection_w.create_index(ct.default_float_vec_field_name, ct.default_index)
log.debug(collection_w.index())
# insert
df = cf.gen_default_dataframe_data(tmp_nb)
@ -1171,6 +1169,10 @@ class TestCompactionOperation(TestcaseBase):
partition_w.insert(df)
assert collection_w.num_entities == tmp_nb * 2
# compaction only applied to indexed segments.
collection_w.create_index(ct.default_float_vec_field_name, ct.default_index)
log.debug(collection_w.index())
# compact
collection_w.compact()
collection_w.wait_for_compaction_completed()