]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: clone non-empty objects, not empty ones
authorSage Weil <sage@redhat.com>
Wed, 16 Dec 2015 14:16:37 +0000 (09:16 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:22 +0000 (13:07 -0500)
This condition was backwards.

Signed-off-by: Sage Weil <sage@redhat.com>
src/test/objectstore/store_test.cc

index 96cbd894a76e50e7f72cbc62e0393c3f52a59e38..14533ef80c198ac091d429a8d9a181955dcab816 100644 (file)
@@ -1457,9 +1457,10 @@ public:
     wait_for_ready();
 
     ghobject_t old_obj;
+    int max = 20;
     do {
       old_obj = get_uniform_random_object();
-    } while (contents[old_obj].data.length());
+    } while (--max && !contents[old_obj].data.length());
     available_objects.erase(old_obj);
     ghobject_t new_obj = object_gen->create_object(rng);
     available_objects.erase(new_obj);