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

Method ZooKeeperTestServer

src/tests/zookeeper_test_server.cpp:40–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace tests {
39
40ZooKeeperTestServer::ZooKeeperTestServer()
41 : zooKeeperServer(nullptr),
42 connectionFactory(nullptr),
43 port(0),
44 started(false)
45{
46 // Create temporary directories for the FileTxnSnapLog.
47 Try<std::string> directory = os::mkdtemp();
48 CHECK_SOME(directory);
49 java::io::File dataDir(directory.get());
50 dataDir.deleteOnExit();
51
52 directory = os::mkdtemp();
53 CHECK_SOME(directory);
54 java::io::File snapDir(directory.get());
55 snapDir.deleteOnExit();
56
57 zooKeeperServer = new ZooKeeperServer(
58 FileTxnSnapLog(dataDir, snapDir),
59 ZooKeeperServer::BasicDataTreeBuilder());
60}
61
62
63ZooKeeperTestServer::~ZooKeeperTestServer()

Callers

nothing calls this directly

Calls 5

FileTxnSnapLogClass · 0.85
deleteOnExitMethod · 0.80
mkdtempFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected