MawoConfiguration { public MawoConfiguration() { this(readConfigFile()); } MawoConfiguration(); private  MawoConfiguration(final Properties properties); Map<String, String> getConfigsMap(); int getRpcServerPort(); String getRpcHostName(); boolean getJobQueueStorageEnabled(); String getZKAddress(); String getZKParentPath(); int getZKRetryIntervalMS(); int getZKSessionTimeoutMS(); int getZKRetriesNum(); String getZKAcl(); int getWorkerConcurrentTasksLimit(); String getJobBuilderClass(); String getWorkerWorkSpace(); String getClusterManagerURL(); boolean getAutoShutdownWorkers(); String getMasterTasksStatusLogPath(); long getMasterDrainEventsTimeout(); List<String> getWorkerWhiteListEnv(); long getTeardownWorkerValidityInterval(); static final String CONFIG_FILE; static final String JOB_BUILDER_CLASS; static final String CLUSTER_MANAGER_URL; static final String AUTO_SHUTDOWN_WORKERS; static final String MASTER_TASKS_STATUS_LOG_PATH; }
@Test public void testMaWoConfiguration() { MawoConfiguration mawoConf = new MawoConfiguration(); Assert.assertEquals(mawoConf.getRpcServerPort(), 5120); Assert.assertTrue("localhost".equals(mawoConf.getRpcHostName())); boolean jobQueueStorage = mawoConf.getJobQueueStorageEnabled(); Assert.assertTrue(jobQueueStorage); Assert.assertEquals(mawoConf.getTeardownWorkerValidityInterval(), 120000); Assert.assertTrue("/tmp/mawoRoot".equals(mawoConf.getZKParentPath())); Assert.assertTrue("localhost:2181".equals(mawoConf.getZKAddress())); Assert.assertEquals(1000, mawoConf.getZKRetryIntervalMS()); Assert.assertEquals(10000, mawoConf.getZKSessionTimeoutMS()); Assert.assertEquals(1000, mawoConf.getZKRetriesNum()); }