use of com.spotify.helios.ZooKeeperTestingServerManager in project helios by spotify.
the class TaskHistoryWriterTest method setUp.
@Before
public void setUp() throws Exception {
zk = new ZooKeeperTestingServerManager();
agentStateDirs = Files.createTempDirectory("helios-agents");
client = new DefaultZooKeeperClient(zk.curatorWithSuperAuth());
makeWriter(client);
final ZooKeeperClientProvider zkProvider = new ZooKeeperClientProvider(client, ZooKeeperModelReporter.noop());
final List<EventSender> eventSenders = Collections.emptyList();
masterModel = new ZooKeeperMasterModel(zkProvider, "test", eventSenders, TaskStatusEvent.TASK_STATUS_EVENT_TOPIC);
client.ensurePath(Paths.configJobs());
client.ensurePath(Paths.configJobRefs());
client.ensurePath(Paths.historyJobHostEvents(JOB_ID, HOSTNAME));
masterModel.registerHost(HOSTNAME, "foo");
masterModel.addJob(JOB);
}
use of com.spotify.helios.ZooKeeperTestingServerManager in project helios by spotify.
the class ZooKeeperAclInitializerTest method setUp.
@Before
public void setUp() {
aclProvider = ZooKeeperAclProviders.heliosAclProvider(MASTER_USER, digest(MASTER_USER, MASTER_PASSWORD), AGENT_USER, digest(AGENT_USER, AGENT_PASSWORD));
zk = new ZooKeeperTestingServerManager();
}
use of com.spotify.helios.ZooKeeperTestingServerManager in project helios by spotify.
the class PersistentPathChildrenCacheTest method setup.
@Before
public void setup() throws Exception {
zk = new ZooKeeperTestingServerManager();
zk.ensure("/foos");
directory = Files.createTempDirectory("helios-test");
stateFile = directory.resolve("persistent-path-children-cache-test-nodes.json");
startCache();
}
use of com.spotify.helios.ZooKeeperTestingServerManager in project helios by spotify.
the class AgentStateDirConflictTest method setup.
@Before
public void setup() throws Exception {
zk = new ZooKeeperTestingServerManager();
dueh = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(final Thread thread, final Throwable th) {
}
});
stateDir = Files.createTempDirectory("helios-agent-conflict-test");
first = makeAgent("first");
second = makeAgent("second");
}
use of com.spotify.helios.ZooKeeperTestingServerManager in project helios by spotify.
the class ZooKeeperRegistrarServiceUtilTest method setUp.
@Before
public void setUp() throws Exception {
testingServerManager = new ZooKeeperTestingServerManager();
testingServerManager.awaitUp(5, TimeUnit.SECONDS);
zkClient = new DefaultZooKeeperClient(testingServerManager.curatorWithSuperAuth());
}
Aggregations