Skip to content

Commit 23d31db

Browse files
committed
[BUG][Tests] Properly set temporary datadir for dbwrapper_basic_data
1 parent 6b95c76 commit 23d31db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/dbwrapper_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
3838

3939
BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
4040
{
41-
fs::path ph = GetDataDir() / "dbwrapper_1";
41+
fs::path ph = SetDataDir(std::string("dbwrapper_basic_data"));
4242
CDBWrapper dbw(ph, (1 << 20), false, true);
4343

4444
uint256 res;
@@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
187187

188188
BOOST_AUTO_TEST_CASE(iterator_ordering)
189189
{
190-
fs::path ph = fs::temp_directory_path() / fs::unique_path();
190+
fs::path ph = SetDataDir(std::string("iterator_ordering"));
191191
CDBWrapper dbw(ph, (1 << 20), true, false);
192192
for (int x=0x00; x<256; ++x) {
193193
uint8_t key = x;
@@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
265265
{
266266
char buf[10];
267267

268-
fs::path ph = fs::temp_directory_path() / fs::unique_path();
268+
fs::path ph = SetDataDir(std::string("iterator_string_ordering"));
269269
CDBWrapper dbw(ph, (1 << 20), true, false);
270270
for (int x=0x00; x<10; ++x) {
271271
for (int y = 0; y < 10; y++) {

0 commit comments

Comments
 (0)