]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/crimson/seastore/test_seastore: add UT for OP_SPLIT_COLLECTION2
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 23 Jul 2025 07:22:08 +0000 (15:22 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Thu, 24 Jul 2025 05:27:37 +0000 (13:27 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/test/crimson/seastore/test_seastore.cc

index bf0d773a897405b0f70896efd3344aee41b3fdd1..94cdaff674d5ebe25053a49642cf59d04bc27f7b 100644 (file)
@@ -700,6 +700,28 @@ TEST_P(seastore_test_t, collection_create_list_remove)
   });
 }
 
+TEST_P(seastore_test_t, collection_split)
+{
+  run_async([this] {
+    coll_t test_coll{spg_t{pg_t{1, 0}}};
+    {
+      sharded_seastore->create_new_collection(test_coll).get();
+      {
+       CTransaction t;
+       t.create_collection(test_coll, 4);
+       do_transaction(std::move(t));
+      }
+      {
+       coll_t test_coll2{spg_t{pg_t{17, 0}}};
+       sharded_seastore->create_new_collection(test_coll2).get();
+       CTransaction t;
+       t.split_collection(test_coll, 5, 5, test_coll2);
+       do_transaction(std::move(t));
+      }
+    }
+  });
+}
+
 TEST_P(seastore_test_t, meta) {
   run_async([this] {
     set_meta("key1", "value1");