Reduce test time for vespalog_threads_test_app.
@@ -85,7 +85,7 @@ public:
int
ThreadTester::Main()
{
- std::cerr << "Testing that logging is threadsafe. 30 sec test.\n";
+ std::cerr << "Testing that logging is threadsafe. 5 sec test.\n";
FastOS_ThreadPool pool(128 * 1024);
const int numWriters = 30;
@@ -107,8 +107,8 @@ ThreadTester::Main()
steady_clock::time_point start = steady_clock::now();
// Reduced runtime to half as the test now repeats itself to test with
- // buffering. (To avoid test taking a minute)
- while ((steady_clock::now() - start) < 15s) {
+ // buffering. (To avoid test taking 5 seconds)
+ while ((steady_clock::now() - start) < 2.5s) {
unlink(_argv[1]);
std::this_thread::sleep_for(1ms);
}
@@ -117,7 +117,7 @@ ThreadTester::Main()
loggers[i]->_useLogBuffer = true;
}
start = steady_clock::now();
- while ((steady_clock::now() - start) < 15s) {
+ while ((steady_clock::now() - start) < 2.5s) {
unlink(_argv[1]);
std::this_thread::sleep_for(1ms);
}
