MCPcopy Create free account
hub / github.com/apache/mesos / foreach

Function foreach

src/tests/container_logger_tests.cpp:306–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 5

SecondsClass · 0.85
MillisecondsClass · 0.85
existsFunction · 0.50
sleepFunction · 0.50
closeFunction · 0.50

Tested by

no test coverage detected