Modifying  text output mapper test case
@@ -52,50 +52,6 @@ public class TextOutputMapperTestCase {
ibmCount.set(0);
}
- // from FooStream
- // publish inMemory options (topic "foo", symbol "{{symbol}}")
- // map text """
- // Hi user
- // {{data}} on {{time}}
- // """;
- @Test(expected = NoSuchAttributeException.class)
- public void testPublisherWithHttpTransport() throws InterruptedException {
- StreamDefinition streamDefinition = StreamDefinition.id("FooStream")
- .attribute("symbol", Attribute.Type.STRING)
- .attribute("price", Attribute.Type.INT)
- .attribute("volume", Attribute.Type.FLOAT);
-
- Query query = Query.query();
- query.from(
- InputStream.stream("FooStream")
- );
- query.publish(
- Transport.transport("inMemory")
- .option("topic", "foo")
- .option("symbol", "{{symbol}}")
- .option("symbol-price", "{{symbol}}-{{price}}")
- .option("non-exist-symbol", "{{non-exist}}-{{symbol}}")
- .option("non-exist", "{{non-exist}}"),
- OutputStream.OutputEventType.CURRENT_EVENTS,
- Mapping.format("text").map("Testing {{non-exist}} attribute.")
- );
-
- SiddhiManager siddhiManager = new SiddhiManager();
- siddhiManager.setExtension("outputtransport:inMemory", InMemoryOutputTransport.class);
- ExecutionPlan executionPlan = new ExecutionPlan("ep1");
- executionPlan.defineStream(streamDefinition);
- executionPlan.addQuery(query);
- ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(executionPlan);
- InputHandler stockStream = executionPlanRuntime.getInputHandler("FooStream");
-
- executionPlanRuntime.start();
- stockStream.send(new Object[]{"WSO2", 55.6f, 100L});
- stockStream.send(new Object[]{"IBM", 75.6f, 100L});
- stockStream.send(new Object[]{"WSO2", 57.6f, 100L});
- Thread.sleep(100);
- executionPlanRuntime.shutdown();
- }
-
// from FooStream
// select symbol
// publish inMemory options ("topic", "{{symbol}}")
