Add possible fix for the test failure
@@ -470,7 +470,7 @@ public class MultiClientDistributedSinkTestCase {
@Override
public void run() {
try {
- Thread.sleep(3000);
+ Thread.sleep(1000);
TestFailingInMemorySink2.fail = false;
} catch (InterruptedException ignore) {
}
@@ -554,6 +554,8 @@ public class MultiClientDistributedSinkTestCase {
siddhiManager.setConfigManager(inMemoryConfigManager);
SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(streams + query);
+
+ try {
InputHandler stockStream = siddhiAppRuntime.getInputHandler("FooStream");
siddhiAppRuntime.start();
@@ -569,11 +571,13 @@ public class MultiClientDistributedSinkTestCase {
//assert event count
AssertJUnit.assertEquals("Number of topic 1 events", 6, topic1Count.get());
AssertJUnit.assertEquals("Number of topic 2 events", 6, topic2Count.get());
+ } finally {
+
siddhiAppRuntime.shutdown();
//unsubscribe from "inMemory" broker per topic
InMemoryBroker.unsubscribe(subscriptionWSO2);
InMemoryBroker.unsubscribe(subscriptionIBM);
-
+ }
}
}
