private LocalTachyonClusterMultiMaster setupMultiMasterCluster() throws IOException, ConnectionFailedException { // Setup and start the tachyon-ft cluster. LocalTachyonClusterMultiMaster cluster = new LocalTachyonClusterMultiMaster(100, TEST_NUM_MASTERS, TEST_BLOCK_SIZE); cluster.start(); mMasterTachyonConf = cluster.getMasterTachyonConf(); mCreateFileThread = new ClientThread(0, cluster.getClient()); mExecutorsForClient.submit(mCreateFileThread); return cluster; }
@Ignore @Test public void multiMasterJournalCrashIntegrationTest() throws Exception { LocalTachyonClusterMultiMaster cluster = setupMultiMasterCluster(); // Kill the leader one by one. for (int kills = 0; kills < TEST_NUM_MASTERS; kills++) { CommonUtils.sleepMs(TEST_TIME_MS); Assert.assertTrue(cluster.killLeader()); } cluster.stopTFS(); CommonUtils.sleepMs(TEST_TIME_MS); // Ensure the client threads are stopped. mExecutorsForClient.shutdown(); while (!mExecutorsForClient.awaitTermination(TEST_TIME_MS, TimeUnit.MILLISECONDS)) {} reproduceAndCheckState(mCreateFileThread.getSuccessNum()); // clean up cluster.stopUFS(); }