From 23d31db8f5bc4a94969381f3084c54ae9a1d8b37 Mon Sep 17 00:00:00 2001 From: random-zebra Date: Sat, 15 May 2021 19:41:10 +0200 Subject: [PATCH] [BUG][Tests] Properly set temporary datadir for dbwrapper_basic_data --- src/test/dbwrapper_tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index d060a03eb8a1..0c2d1a58909b 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper) BOOST_AUTO_TEST_CASE(dbwrapper_basic_data) { - fs::path ph = GetDataDir() / "dbwrapper_1"; + fs::path ph = SetDataDir(std::string("dbwrapper_basic_data")); CDBWrapper dbw(ph, (1 << 20), false, true); uint256 res; @@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator) BOOST_AUTO_TEST_CASE(iterator_ordering) { - fs::path ph = fs::temp_directory_path() / fs::unique_path(); + fs::path ph = SetDataDir(std::string("iterator_ordering")); CDBWrapper dbw(ph, (1 << 20), true, false); for (int x=0x00; x<256; ++x) { uint8_t key = x; @@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering) { char buf[10]; - fs::path ph = fs::temp_directory_path() / fs::unique_path(); + fs::path ph = SetDataDir(std::string("iterator_string_ordering")); CDBWrapper dbw(ph, (1 << 20), true, false); for (int x=0x00; x<10; ++x) { for (int y = 0; y < 10; y++) {