Skip to content

Commit

Permalink
test/objectstore: Make test idempotent
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo E. Castro <[email protected]>
  • Loading branch information
pecastro committed Nov 16, 2024
1 parent d6a0eb2 commit f2c5e80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/objectstore/test_deferred.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <memory>
#include <time.h>
Expand Down Expand Up @@ -44,10 +45,11 @@ void create_deferred_and_terminate() {
coll_t cid;
ghobject_t hoid;
ObjectStore::CollectionHandle ch;
ceph_assert(::mkdir("bluestore.test_temp_dir", 0777) == 0);
std::string const db_store_dir = "bluestore.test_temp_dir_" + std::to_string(time(NULL));
ceph_assert(::mkdir(db_store_dir.c_str(), 0777) == 0);
store = ObjectStore::create(g_ceph_context,
"bluestore",
"bluestore.test_temp_dir",
db_store_dir.c_str(),
"store_test_temp_journal");
ceph_assert(store->mkfs() == 0);
ceph_assert(store->mount() == 0);
Expand Down

0 comments on commit f2c5e80

Please sign in to comment.