]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/seastore: fix bug in the collection manager test case 42178/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Mon, 5 Jul 2021 08:56:53 +0000 (16:56 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Mon, 5 Jul 2021 09:00:36 +0000 (17:00 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/test/crimson/seastore/test_collection_manager.cc

index 3f8b520f5da2d9718958f685963ca777b10167ff..a2ccdf2063f370ed1e8d4358a1838481bd89ed7c 100644 (file)
@@ -122,9 +122,10 @@ TEST_F(collection_manager_test_t, basic)
     checking_mappings(coll_root);
     {
       auto t = tm->create_transaction();
-      for (auto& ite : test_coll_mappings) {
-        remove(coll_root, *t, ite.first);
-        test_coll_mappings.erase(ite.first);
+      for (auto iter = test_coll_mappings.begin();
+           iter != test_coll_mappings.end();) {
+        remove(coll_root, *t, iter->first);
+        iter = test_coll_mappings.erase(iter);
       }
       submit_transaction(std::move(t));
     }