diff options
Diffstat (limited to 'test/log')
-rw-r--r-- | test/log/log_api.cpp | 2 | ||||
-rw-r--r-- | test/log/log_process.cpp | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp index 53118960..0b999738 100644 --- a/test/log/log_api.cpp +++ b/test/log/log_api.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * log.cpp - log API test + * log API test */ #include <algorithm> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 966b80cf..9609e23d 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * log_process.cpp - Logging in isolated child process test + * Logging in isolated child process test */ #include <fcntl.h> @@ -81,12 +81,13 @@ protected: return TestFail; } - timeout.start(200ms); + timeout.start(2s); while (timeout.isRunning()) dispatcher->processEvents(); if (exitStatus_ != Process::NormalExit) { - cerr << "process did not exit normally" << endl; + cerr << "process did not exit normally: " << exitStatus_ + << endl; return TestFail; } @@ -115,8 +116,11 @@ protected: close(fd); string str(buf); - if (str.find(message) == string::npos) + if (str.find(message) == string::npos) { + cerr << "Received message is not correct (received " + << str.length() << " bytes)" << endl; return TestFail; + } return TestPass; } @@ -136,7 +140,7 @@ private: ProcessManager processManager_; Process proc_; - Process::ExitStatus exitStatus_; + Process::ExitStatus exitStatus_ = Process::NotExited; string logPath_; int exitCode_; int num_; |