use of org.apache.heron.resource.TestSpout in project heron by twitter.
the class BoltStatefulInstanceTest method buildPhysicalPlanMessage.
private InstanceControlMsg buildPhysicalPlanMessage(IRichBolt bolt) {
PhysicalPlans.PhysicalPlan physicalPlan = MockPhysicalPlansBuilder.newBuilder().withTopologyConfig(Config.TopologyReliabilityMode.EFFECTIVELY_ONCE, -1).withTopologyState(TopologyAPI.TopologyState.RUNNING).withSpoutInstance("test-spout", 0, "spout-id", new TestSpout()).withBoltInstance("test-bolt", 1, "bolt-id", "test-spout", bolt).build();
PhysicalPlanHelper ph = new PhysicalPlanHelper(physicalPlan, "bolt-id");
return InstanceControlMsg.newBuilder().setNewPhysicalPlanHelper(ph).build();
}
use of org.apache.heron.resource.TestSpout in project heron by twitter.
the class StreamletImplTest method testSpoutStreamlet.
@Test
public void testSpoutStreamlet() {
TestSpout spout = new TestSpout();
Streamlet<Double> streamlet = builder.newSource(spout);
assertTrue(streamlet instanceof SpoutStreamlet);
}
Aggregations