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

Method SetUp

src/tests/state_tests.cpp:485–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483
484protected:
485 void SetUp() override
486 {
487 TemporaryDirectoryTest::SetUp();
488
489 // For initializing the replicas.
490 tool::Initialize initializer;
491
492 string path1 = os::getcwd() + "/.log1";
493 string path2 = os::getcwd() + "/.log2";
494
495 initializer.flags.path = path1;
496 initializer.execute();
497
498 initializer.flags.path = path2;
499 initializer.execute();
500
501 // Only create the replica for 'path2' (i.e., the second replica)
502 // as the first replica will be created when we create a Log.
503 replica2 = new Replica(path2);
504
505 set<UPID> pids;
506 pids.insert(replica2->pid());
507
508 log = new Log(2, path1, pids);
509 storage = new mesos::state::LogStorage(log, 1024);
510 state = new State(storage);
511 }
512
513 void TearDown() override
514 {

Callers

nothing calls this directly

Calls 4

insertMethod · 0.80
getcwdFunction · 0.50
executeMethod · 0.45
pidMethod · 0.45

Tested by

no test coverage detected