| 483 | |
| 484 | protected: |
| 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 | { |