/** * Run with a local cluster * @deprecated use ``` * try (LocalCluster cluster = new LocalCluster()) { * ... * } * ``` * @param code what to run */ @Deprecated public static void withLocalCluster(TestJob code) { withLocalCluster(new MkClusterParam(), code); }
/** * Run with a local cluster * @deprecated use ``` * try (LocalCluster cluster = new LocalCluster.Builder().withTracked().build()) { * ... * } * ``` * @param code what to run */ @Deprecated public static void withTrackedCluster(TestJob code) { withTrackedCluster(new MkClusterParam(), code); }
/** * Run with a local cluster * @deprecated use ``` * try (LocalCluster cluster = new LocalCluster.Builder().withSimulatedTime().build()) { * ... * } * ``` * @param code what to run */ @Deprecated public static void withSimulatedTimeLocalCluster(TestJob code) { withSimulatedTimeLocalCluster(new MkClusterParam(), code); }
@Test @IntegrationTest public void testCompleteTopologyLocal() throws Exception { MkClusterParam param = new MkClusterParam(); param.setSupervisors(4); Testing.withLocalCluster(param, COMPLETE_TOPOLOGY_TESTJOB); }
@Test @IntegrationTest public void testCompleteTopologyLocalSimulated() throws Exception { MkClusterParam param = new MkClusterParam(); param.setSupervisors(4); Testing.withSimulatedTimeLocalCluster(param, COMPLETE_TOPOLOGY_TESTJOB); }
@Test @IntegrationTest public void testCompleteTopologyNettySimulated() throws Exception { Config daemonConf = new Config(); daemonConf.put(Config.STORM_LOCAL_MODE_ZMQ, true); MkClusterParam param = new MkClusterParam(); param.setSupervisors(4); param.setDaemonConf(daemonConf); Testing.withSimulatedTimeLocalCluster(param, COMPLETE_TOPOLOGY_TESTJOB); }
@Test @IntegrationTest public void testCompleteTopologyNetty() throws Exception { Config daemonConf = new Config(); daemonConf.put(Config.STORM_LOCAL_MODE_ZMQ, true); MkClusterParam param = new MkClusterParam(); param.setSupervisors(4); param.setDaemonConf(daemonConf); Testing.withLocalCluster(param, COMPLETE_TOPOLOGY_TESTJOB); }
MkClusterParam mkClusterParam = new MkClusterParam(); mkClusterParam.setSupervisors(1); mkClusterParam.setPortsPerSupervisor(32); //Hard limit on the number of topologies that can run at once