diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/dbwrapper_tests.cpp | 8 | ||||
-rw-r--r-- | src/test/scheduler_tests.cpp | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index b647c0f70b..3dfae29de6 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -399,15 +399,15 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering) BOOST_AUTO_TEST_CASE(unicodepath) { - // Attempt to create a database with a utf8 character in the path. + // Attempt to create a database with a UTF8 character in the path. // On Windows this test will fail if the directory is created using - // the ANSI CreateDirectoryA call and the code page isn't UTF8. - // It will succeed if the created with CreateDirectoryW. + // the ANSI CreateDirectoryA call and the code page isn't UTF8. + // It will succeed if created with CreateDirectoryW. fs::path ph = GetDataDir() / "test_runner_₿_🏃_20191128_104644"; CDBWrapper dbw(ph, (1 << 20)); fs::path lockPath = ph / "LOCK"; - BOOST_CHECK(boost::filesystem::exists(lockPath)); + BOOST_CHECK(fs::exists(lockPath)); } diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index caf9be5bd6..801cf8e5d1 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -168,10 +168,10 @@ BOOST_AUTO_TEST_CASE(mockforward) CScheduler::Function dummy = [&counter]{counter++;}; // schedule jobs for 2, 5 & 8 minutes into the future - int64_t min_in_milli = 60*1000; - scheduler.scheduleFromNow(dummy, 2*min_in_milli); - scheduler.scheduleFromNow(dummy, 5*min_in_milli); - scheduler.scheduleFromNow(dummy, 8*min_in_milli); + + scheduler.scheduleFromNow(dummy, std::chrono::minutes{2}); + scheduler.scheduleFromNow(dummy, std::chrono::minutes{5}); + scheduler.scheduleFromNow(dummy, std::chrono::minutes{8}); // check taskQueue std::chrono::system_clock::time_point first, last; @@ -181,10 +181,10 @@ BOOST_AUTO_TEST_CASE(mockforward) std::thread scheduler_thread([&]() { scheduler.serviceQueue(); }); // bump the scheduler forward 5 minutes - scheduler.MockForward(std::chrono::seconds(5*60)); + scheduler.MockForward(std::chrono::minutes{5}); // ensure scheduler has chance to process all tasks queued for before 1 ms from now. - scheduler.scheduleFromNow([&scheduler]{ scheduler.stop(false); }, 1); + scheduler.scheduleFromNow([&scheduler] { scheduler.stop(false); }, std::chrono::milliseconds{1}); scheduler_thread.join(); // check that the queue only has one job remaining |