use of org.apache.storm.testing.MkClusterParam in project open-kilda by telstra.
the class StableAbstractStormTest method setupOnce.
@BeforeClass
public static void setupOnce() throws Exception {
System.out.println("------> Creating Sheep \uD83D\uDC11\n");
clusterParam = new MkClusterParam();
clusterParam.setSupervisors(1);
Config daemonConfig = new Config();
daemonConfig.put(Config.STORM_LOCAL_MODE_ZMQ, false);
clusterParam.setDaemonConf(daemonConfig);
makeConfigFile();
Config conf = new Config();
conf.setNumWorkers(1);
completeTopologyParam = new CompleteTopologyParam();
completeTopologyParam.setStormConf(conf);
}
use of org.apache.storm.testing.MkClusterParam in project open-kilda by telstra.
the class TopologyTest method verifyEmittedValues.
@Test
public void verifyEmittedValues() {
MkClusterParam clusterParam = new MkClusterParam();
clusterParam.setSupervisors(1);
withSimulatedTimeLocalCluster(clusterParam, new TestJob() {
@Override
public void run(ILocalCluster cluster) throws JsonProcessingException {
MockedSources mockedSources = new MockedSources();
mockedSources.addMockData(builder.getSpoutId(), new Values(SWITCH_ID));
Config config = new Config();
config.setDebug(true);
CompleteTopologyParam topologyParam = new CompleteTopologyParam();
topologyParam.setMockedSources(mockedSources);
topologyParam.setStormConf(config);
Map<?, ?> result = completeTopology(cluster, builder.build(), topologyParam);
assertTrue(multiseteq(new Values(new Values(SWITCH_ID)), readTuples(result, builder.getSpoutId())));
assertTrue(multiseteq(new Values(new Values(SWITCH_ID)), readTuples(result, builder.getConfirmationBoltId())));
}
});
}
use of org.apache.storm.testing.MkClusterParam in project storm by apache.
the class TestingTest method testCompleteTopologyNetty.
@Test
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);
}
use of org.apache.storm.testing.MkClusterParam in project storm by apache.
the class TestingTest method testCompleteTopologyLocal.
@Test
public void testCompleteTopologyLocal() throws Exception {
MkClusterParam param = new MkClusterParam();
param.setSupervisors(4);
Testing.withLocalCluster(param, COMPLETE_TOPOLOGY_TESTJOB);
}
use of org.apache.storm.testing.MkClusterParam in project storm by apache.
the class TestingTest method testCompleteTopologyNettySimulated.
@Test
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);
}
Aggregations