Small fixes to test cases

This commit is contained in:
Ian Roddis
2022-01-28 10:23:21 -04:00
parent c09d5b7d8b
commit c9820c19a0
11 changed files with 73 additions and 68 deletions

View File

@@ -4,6 +4,7 @@
#include "daggy/ThreadPool.hpp"
using namespace std::chrono_literals;
using namespace daggy;
TEST_CASE("threadpool", "[threadpool]")
@@ -36,8 +37,12 @@ TEST_CASE("threadpool", "[threadpool]")
cnt++;
return;
}));
for (auto &r : res)
for (auto &r : res) {
while (! r->ready()) {
std::this_thread::sleep_for(150ms);
}
r->get();
}
REQUIRE(cnt == 100);
}
}