use of org.apache.flink.storm.tests.operators.VerifyMetaDataBolt in project flink by apache.
the class StormMetaDataITCase method testProgram.
@Override
protected void testProgram() throws Exception {
final TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(spoutId, new MetaDataSpout(), 2);
builder.setBolt(boltId1, new VerifyMetaDataBolt(), 2).localOrShuffleGrouping(spoutId, MetaDataSpout.STREAM_ID);
builder.setBolt(boltId2, new VerifyMetaDataBolt()).shuffleGrouping(boltId1, VerifyMetaDataBolt.STREAM_ID);
final FlinkLocalCluster cluster = FlinkLocalCluster.getLocalCluster();
cluster.submitTopology(topologyId, null, FlinkTopology.createTopology(builder));
// run topology for 5 seconds
Utils.sleep(5 * 1000);
cluster.shutdown();
Assert.assertFalse(VerifyMetaDataBolt.errorOccured);
}
Aggregations