| 304 | Try<os::ProcessTree> pstrees = os::pstree(0); |
| 305 | ASSERT_SOME(pstrees); |
| 306 | foreach (const os::ProcessTree& pstree, pstrees->children) { |
| 307 | // Wait for the logger subprocesses to exit, for up to 5 seconds each. |
| 308 | Duration waited = Duration::zero(); |
| 309 | do { |
| 310 | if (!os::exists(pstree.process.pid)) { |
| 311 | break; |
| 312 | } |
| 313 | |
| 314 | // Push the clock ahead to speed up the reaping of subprocesses. |
| 315 | Clock::pause(); |
| 316 | Clock::settle(); |
| 317 | Clock::advance(Seconds(1)); |
| 318 | Clock::resume(); |
| 319 | |
| 320 | os::sleep(Milliseconds(100)); |
| 321 | waited += Milliseconds(100); |
| 322 | } while (waited < Seconds(5)); |
| 323 | |
| 324 | EXPECT_LE(waited, Seconds(5)); |
| 325 | } |
| 326 | |
| 327 | // Check for the expected log rotation. |
| 328 | string sandboxDirectory = path::join( |
nothing calls this directly
no test coverage detected