]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: ceph_test_objectstore: verify the retcode of apply_transaction()
authorKefu Chai <kchai@redhat.com>
Fri, 14 Apr 2017 04:54:52 +0000 (12:54 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 14 Apr 2017 05:45:19 +0000 (13:45 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/objectstore/store_test.cc

index 627a5337dbdfe33ed1bc7092c40e9649a6edf901..7e039b1f3fdf887238cbe8c310c22ab8af2c1768 100644 (file)
@@ -3092,7 +3092,7 @@ TEST_P(StoreTest, LongnameSplitTest) {
     t.create_collection(cid, 0);
     cerr << "Creating collection " << cid << std::endl;
     r = apply_transaction(store, &osr, std::move(t));
-    ASSERT_EQ(r, 0);
+    ASSERT_EQ(0, r);
   }
   for (unsigned i = 0; i < 320; ++i) {
     ObjectStore::Transaction t;
@@ -3100,6 +3100,7 @@ TEST_P(StoreTest, LongnameSplitTest) {
     t.touch(cid, hoid);
     cerr << "Creating object " << hoid << std::endl;
     r = apply_transaction(store, &osr, std::move(t));
+    ASSERT_EQ(0, r);
   }
 
   ghobject_t test_obj = generate_long_name(319);
@@ -3112,6 +3113,7 @@ TEST_P(StoreTest, LongnameSplitTest) {
       cid, test_obj,
       cid, test_obj_2);
     r = apply_transaction(store, &osr, std::move(t));
+    ASSERT_EQ(0, r);
   }
 
   for (unsigned i = 0; i < 319; ++i) {
@@ -3120,6 +3122,7 @@ TEST_P(StoreTest, LongnameSplitTest) {
     t.remove(cid, hoid);
     cerr << "Removing object " << hoid << std::endl;
     r = apply_transaction(store, &osr, std::move(t));
+    ASSERT_EQ(0, r);
   }
   {
     ObjectStore::Transaction t;
@@ -3127,7 +3130,7 @@ TEST_P(StoreTest, LongnameSplitTest) {
     t.remove_collection(cid);
     cerr << "Cleaning" << std::endl;
     r = apply_transaction(store, &osr, std::move(t));
-    ASSERT_EQ(r, 0);
+    ASSERT_EQ(0, r);
   }
 
 }