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

Function foreach

src/tests/master_allocator_tests.cpp:1267–1284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1265 "cpus:0.5;mem:10;disk:50;ports:[16-20]"};
1266
1267 foreach (const string& resourcesString, nonAllocatableAgentResources) {
1268 Future<SlaveRegisteredMessage> slaveRegisteredMessage =
1269 FUTURE_PROTOBUF(SlaveRegisteredMessage(), _, _);
1270
1271 slave::Flags flags = this->CreateSlaveFlags();
1272 flags.resources = resourcesString;
1273
1274 Try<Owned<cluster::Slave>> slave = this->StartSlave(detector.get(), flags);
1275 ASSERT_SOME(slave);
1276
1277 // Advance the clock to trigger agent registration.
1278 Clock::advance(flags.registration_backoff_factor);
1279 Clock::settle();
1280
1281 AWAIT_READY(slaveRegisteredMessage);
1282
1283 slaves.push_back(slave.get());
1284 }
1285
1286 // Add agents with allocatable resources.
1287 vector<string> allocatableAgentResources = {

Callers

nothing calls this directly

Calls 5

StartSlaveMethod · 0.80
insertMethod · 0.80
CreateSlaveFlagsMethod · 0.45
getMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected