mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
test(db): test delete group partitions
Former-commit-id: af392c6bf9440a5d29ee152e4d4129153b499f94
This commit is contained in:
parent
4e1736f3ab
commit
a7c22f8e53
@ -64,10 +64,26 @@ TEST_F(MetaTest, GROUP_FILE_TEST) {
|
||||
status = impl_->delete_group_partitions(group_file.group_id, dates);
|
||||
ASSERT_FALSE(status.ok());
|
||||
|
||||
/* group_file.file_type = meta::GroupFileSchema::NEW; */
|
||||
/* status = impl_->get_group_file(group_file.group_id, group_file.file_id, group_file); */
|
||||
/* ASSERT_TRUE(status.ok()); */
|
||||
/* ASSERT_EQ(group_file.file_type, new_file_type); */
|
||||
dates.clear();
|
||||
for (auto i=2; i < 10; ++i) {
|
||||
dates.push_back(meta::Meta::GetDateWithDelta(-1*i));
|
||||
}
|
||||
status = impl_->delete_group_partitions(group_file.group_id, dates);
|
||||
ASSERT_TRUE(status.ok());
|
||||
|
||||
group_file.date = meta::Meta::GetDateWithDelta(-2);
|
||||
status = impl_->update_group_file(group_file);
|
||||
ASSERT_TRUE(status.ok());
|
||||
ASSERT_EQ(group_file.date, meta::Meta::GetDateWithDelta(-2));
|
||||
ASSERT_FALSE(group_file.file_type == meta::GroupFileSchema::TO_DELETE);
|
||||
|
||||
dates.clear();
|
||||
dates.push_back(group_file.date);
|
||||
status = impl_->delete_group_partitions(group_file.group_id, dates);
|
||||
ASSERT_TRUE(status.ok());
|
||||
status = impl_->get_group_file(group_file.group_id, group_file.file_id, group_file);
|
||||
ASSERT_TRUE(status.ok());
|
||||
ASSERT_TRUE(group_file.file_type == meta::GroupFileSchema::TO_DELETE);
|
||||
}
|
||||
|
||||
TEST_F(MetaTest, GROUP_FILES_TEST) {
|
||||
|
Loading…
Reference in New Issue
Block a user