Skip to content

Commit 3335968

Browse files
committed
test/crimson/seastore/test_seastore: add UT for OP_SPLIT_COLLECTION2
Signed-off-by: Xuehan Xu <[email protected]>
1 parent 5208cc6 commit 3335968

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/test/crimson/seastore/test_seastore.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,28 @@ TEST_P(seastore_test_t, collection_create_list_remove)
700700
});
701701
}
702702

703+
TEST_P(seastore_test_t, collection_split)
704+
{
705+
run_async([this] {
706+
coll_t test_coll{spg_t{pg_t{1, 0}}};
707+
{
708+
sharded_seastore->create_new_collection(test_coll).get();
709+
{
710+
CTransaction t;
711+
t.create_collection(test_coll, 4);
712+
do_transaction(std::move(t));
713+
}
714+
{
715+
coll_t test_coll2{spg_t{pg_t{17, 0}}};
716+
sharded_seastore->create_new_collection(test_coll2).get();
717+
CTransaction t;
718+
t.split_collection(test_coll, 5, 5, test_coll2);
719+
do_transaction(std::move(t));
720+
}
721+
}
722+
});
723+
}
724+
703725
TEST_P(seastore_test_t, meta) {
704726
run_async([this] {
705727
set_meta("key1", "value1");

0 commit comments

Comments
 (0)