diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml
index b6f55e1a3..18ddcde60 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/pom.xml
@@ -148,6 +148,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
\ No newline at end of file
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/ExtensionTestCase.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/ExtensionTestCase.java
index 801b9e93a..607fcb537 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/ExtensionTestCase.java
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/ExtensionTestCase.java
@@ -49,7 +49,6 @@ import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.extension.siddhi.device.test.util.SiddhiTestHelper;
import org.wso2.extension.siddhi.device.test.util.TestDataHolder;
import org.wso2.extension.siddhi.device.test.util.TestDeviceManagementService;
-import org.wso2.extension.siddhi.device.test.util.TestUtils;
import org.wso2.extension.siddhi.device.utils.DeviceUtils;
import org.wso2.siddhi.core.ExecutionPlanRuntime;
import org.wso2.siddhi.core.SiddhiManager;
@@ -79,7 +78,7 @@ public class ExtensionTestCase extends BaseDeviceManagementTest {
@Override
public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
EventPrinter.print(timeStamp, inEvents, removeEvents);
- for (Event event : inEvents) {
+ for (Event ignored : inEvents) {
count.incrementAndGet();
eventArrived = true;
}
@@ -127,8 +126,10 @@ public class ExtensionTestCase extends BaseDeviceManagementTest {
@Test
public void createGroup() throws GroupManagementException, GroupAlreadyExistException {
- groupManagementProviderService.createGroup(TestUtils.createDeviceGroup1(), DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_PERMISSIONS);
- groupManagementProviderService.createGroup(TestUtils.createDeviceGroup2(), DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_PERMISSIONS);
+ groupManagementProviderService.createGroup(TestDataHolder.generateDummyGroupData(1),
+ DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_PERMISSIONS);
+ groupManagementProviderService.createGroup(TestDataHolder.generateDummyGroupData(2),
+ DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_PERMISSIONS);
}
@Test
@@ -149,13 +150,38 @@ public class ExtensionTestCase extends BaseDeviceManagementTest {
configuration.setEnabled(false);
DeviceConfigurationManager.getInstance().getDeviceManagementConfig().setDeviceCacheConfiguration(configuration);
- List list = TestUtils.getDeviceIdentifiersList(DEVICE_TYPE);
- DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName());
+ List list = TestDataHolder.getDeviceIdentifiersList(DEVICE_TYPE);
+ DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestDataHolder.generateDummyGroupData(1).getName());
Assert.assertNotNull(deviceGroup);
groupManagementProviderService.addDevices(deviceGroup.getGroupId(), list);
}
@Test(dependsOnMethods = {"addDevices"})
+ public void testIsEnrolledExtension() throws InterruptedException, GroupManagementException {
+ log.info("IsEnrolled TestCase");
+ SiddhiManager siddhiManager = new SiddhiManager();
+
+ count.set(0);
+ eventArrived = false;
+
+ String inStreamDefinition = "define stream inputStream (deviceId string, deviceType string);";
+ String query = ("@info(name = 'query1') from inputStream[device:isEnrolled(deviceId, deviceType)] " +
+ "select deviceId insert into outputStream;");
+ ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
+ executionPlanRuntime.addCallback("query1", queryCallback);
+
+ InputHandler inputHandler = executionPlanRuntime.getInputHandler("inputStream");
+ executionPlanRuntime.start();
+ DeviceIdentifier deviceIdentifier = TestDataHolder.getDeviceIdentifiersList(DEVICE_TYPE).get(0);
+ inputHandler.send(new Object[]{deviceIdentifier.getId(), deviceIdentifier.getType()});
+ inputHandler.send(new Object[]{"99999", deviceIdentifier.getType()});
+ SiddhiTestHelper.waitForEvents(100, 1, count, 10000);
+ Assert.assertTrue(eventArrived);
+ Assert.assertEquals(1, count.get());
+ executionPlanRuntime.shutdown();
+ }
+
+ @Test(dependsOnMethods = {"testIsEnrolledExtension"})
public void testIsInGroupExtension() throws InterruptedException, GroupManagementException {
log.info("IsInGroup TestCase");
SiddhiManager siddhiManager = new SiddhiManager();
@@ -171,11 +197,11 @@ public class ExtensionTestCase extends BaseDeviceManagementTest {
InputHandler inputHandler = executionPlanRuntime.getInputHandler("inputStream");
executionPlanRuntime.start();
- DeviceIdentifier deviceIdentifier = TestUtils.getDeviceIdentifiersList(DEVICE_TYPE).get(0);
+ DeviceIdentifier deviceIdentifier = TestDataHolder.getDeviceIdentifiersList(DEVICE_TYPE).get(0);
inputHandler.send(new Object[]{groupManagementProviderService.getGroup(
- TestUtils.createDeviceGroup1().getName()).getGroupId(), deviceIdentifier.getId(), deviceIdentifier.getType()});
+ TestDataHolder.generateDummyGroupData(1).getName()).getGroupId(), deviceIdentifier.getId(), deviceIdentifier.getType()});
inputHandler.send(new Object[]{groupManagementProviderService.getGroup(
- TestUtils.createDeviceGroup2().getName()).getGroupId(), deviceIdentifier.getId(), deviceIdentifier.getType()});
+ TestDataHolder.generateDummyGroupData(2).getName()).getGroupId(), deviceIdentifier.getId(), deviceIdentifier.getType()});
SiddhiTestHelper.waitForEvents(100, 1, count, 10000);
Assert.assertTrue(eventArrived);
Assert.assertEquals(1, count.get());
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestDataHolder.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestDataHolder.java
index 6c2fe832f..6b482abcb 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestDataHolder.java
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestDataHolder.java
@@ -30,13 +30,8 @@ import java.util.Properties;
public class TestDataHolder {
- public final static String TEST_DEVICE_TYPE = "Test";
- public final static Integer SUPER_TENANT_ID = -1234;
- public final static String SUPER_TENANT_DOMAIN = "carbon.super";
public final static String initialDeviceIdentifier = "12345";
public final static String OWNER = "admin";
- public static Device initialTestDevice;
- public static DeviceType initialTestDeviceType;
public static Device generateDummyDeviceData(String deviceType) {
Device device = new Device();
@@ -53,75 +48,23 @@ public class TestDataHolder {
return device;
}
- public static Notification getNotification(int notificationId, String status, String deviceId,
- String description, String deviceName, int operationId,
- String deviceType) {
- Notification notification = new Notification();
- notification.setNotificationId(notificationId);
- notification.setStatus(status);
- notification.setDeviceIdentifier(deviceId);
- notification.setDescription(description);
- notification.setDeviceName(deviceName);
- notification.setOperationId(operationId);
- notification.setDeviceType(deviceType);
- return notification;
- }
-
- public static Device generateDummyDeviceData(String deviceIdentifier, String deviceType,
- EnrolmentInfo enrolmentInfo) {
- Device device = new Device();
- device.setEnrolmentInfo(enrolmentInfo);
- device.setDescription("Test Description");
- device.setDeviceIdentifier(deviceIdentifier);
- device.setType(deviceType);
- return device;
- }
-
- public static List generateDummyDeviceData(List deviceIds) {
- List devices = new ArrayList<>();
- for (DeviceIdentifier deviceId : deviceIds) {
- Device device = new Device();
- EnrolmentInfo enrolmentInfo = new EnrolmentInfo();
- enrolmentInfo.setDateOfEnrolment(new Date().getTime());
- enrolmentInfo.setDateOfLastUpdate(new Date().getTime());
- enrolmentInfo.setOwner(OWNER);
- enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD);
- enrolmentInfo.setStatus(EnrolmentInfo.Status.CREATED);
- device.setEnrolmentInfo(enrolmentInfo);
- device.setDescription("Test Description");
- device.setDeviceIdentifier(deviceId.getId());
- device.setType(deviceId.getType());
- devices.add(device);
- }
- return devices;
+ public static DeviceGroup generateDummyGroupData(int testId) {
+ DeviceGroup deviceGroup = new DeviceGroup();
+ deviceGroup.setName("Test" + testId);
+ deviceGroup.setDescription("Test description " + testId);
+ deviceGroup.setOwner(OWNER);
+ return deviceGroup;
}
- public static DeviceType generateDeviceTypeData(String devTypeName) {
- DeviceType deviceType = new DeviceType();
- deviceType.setName(devTypeName);
- return deviceType;
- }
+ public static List getDeviceIdentifiersList(String deviceType){
+ Device device = generateDummyDeviceData(deviceType);
+ DeviceIdentifier identifier = new DeviceIdentifier();
+ identifier.setId(device.getDeviceIdentifier());
+ identifier.setType(deviceType);
- public static Application generateApplicationDummyData(String appIdentifier) {
- Application application = new Application();
- Properties properties = new Properties();
- properties.setProperty("test1", "testVal");
- application.setName("SimpleCalculator");
- application.setCategory("TestCategory");
- application.setApplicationIdentifier(appIdentifier);
- application.setType("TestType");
- application.setVersion("1.0.0");
- application.setImageUrl("http://test.org/image/");
- application.setLocationUrl("http://test.org/location/");
- application.setAppProperties(properties);
- return application;
- }
+ List list = new ArrayList<>();
+ list.add(identifier);
- public static DeviceGroup generateDummyGroupData() {
- DeviceGroup deviceGroup = new DeviceGroup();
- deviceGroup.setName("Test device group");
- deviceGroup.setDescription("Test description");
- deviceGroup.setOwner(OWNER);
- return deviceGroup;
+ return list;
}
}
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestUtils.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestUtils.java
index 20ed04dae..673b2b521 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestUtils.java
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/java/org/wso2/extension/siddhi/device/test/util/TestUtils.java
@@ -58,35 +58,4 @@ public class TestUtils {
}
}
}
-
-
- public static DeviceGroup createDeviceGroup1(){
- DeviceGroup group = new DeviceGroup();
- group.setName("TEST_GROUP_01");
- group.setDescription("TEST_GROUP_01 - Description");
- group.setOwner("admin");
- return group;
- }
-
-
- public static DeviceGroup createDeviceGroup2(){
- DeviceGroup group = new DeviceGroup();
- group.setName("TEST_GROUP_02");
- group.setDescription("TEST_GROUP_02 - Description");
- group.setOwner("admin");
- return group;
- }
-
- public static List getDeviceIdentifiersList(String deviceType){
-
- Device device = TestDataHolder.generateDummyDeviceData(deviceType);
- DeviceIdentifier identifier = new DeviceIdentifier();
- identifier.setId(device.getDeviceIdentifier());
- identifier.setType(deviceType);
-
- List list = new ArrayList<>();
- list.add(identifier);
-
- return list;
- }
}
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/testng.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/testng.xml
index a2e39e52e..2f25f2a58 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/testng.xml
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.device/src/test/resources/testng.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
index 54c691765..de341dfb6 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
@@ -48,8 +48,8 @@
json
- junit
- junit
+ org.testng
+ testng
test
@@ -84,6 +84,18 @@
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ file:src/test/resources/log4j.properties
+
+
+ src/test/resources/testng.xml
+
+
+
org.jacoco
jacoco-maven-plugin
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/java/org/wso2/extension/siddhi/execution/json/GetArrayFunctionExtension.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/java/org/wso2/extension/siddhi/execution/json/GetArrayFunctionExtension.java
new file mode 100644
index 000000000..08712416e
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/java/org/wso2/extension/siddhi/execution/json/GetArrayFunctionExtension.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.wso2.extension.siddhi.execution.json;
+
+import org.json.JSONArray;
+import org.wso2.siddhi.core.config.ExecutionPlanContext;
+import org.wso2.siddhi.core.executor.ExpressionExecutor;
+import org.wso2.siddhi.core.executor.function.FunctionExecutor;
+import org.wso2.siddhi.query.api.definition.Attribute;
+import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
+
+/**
+ * getArray(elements..)
+ * Returns json array of elements as a string
+ * Accept Type(s): (STRING|INT|DOUBLE|FLOAT|OBJECT ..)
+ * Return Type(s): (STRING)
+ */
+public class GetArrayFunctionExtension extends FunctionExecutor {
+
+ private Attribute.Type returnType = Attribute.Type.STRING;
+
+ @Override
+ protected void init(ExpressionExecutor[] attributeExpressionExecutors,
+ ExecutionPlanContext executionPlanContext) {
+ if (attributeExpressionExecutors.length <= 0) {
+ throw new ExecutionPlanValidationException(
+ "Invalid no of arguments passed to json:getArray() function," + " required one or more, but found "
+ + attributeExpressionExecutors.length);
+ }
+ Attribute.Type inputType = attributeExpressionExecutors[0].getReturnType();
+ for (int i = 1; i < attributeExpressionExecutors.length; i++) {
+ if (attributeExpressionExecutors[0].getReturnType() != inputType) {
+ throw new ExecutionPlanValidationException(
+ "Parameter types are inconsistent. All parameters should be same");
+ }
+ }
+ }
+
+ @Override
+ protected Object execute(Object[] data) {
+
+ JSONArray jsonArray = new JSONArray();
+ for (Object obj : data) {
+ jsonArray.put(obj);
+ }
+ return jsonArray.toString();
+ }
+
+ @Override
+ protected Object execute(Object data) {
+ return execute(new Object[]{data});
+ }
+
+ @Override
+ public void start() {
+ //Nothing to start
+ }
+
+ @Override
+ public void stop() {
+ //Nothing to stop
+ }
+
+ @Override
+ public Attribute.Type getReturnType() {
+ return returnType;
+ }
+
+ @Override
+ public Object[] currentState() {
+ return null; //No need to maintain a state.
+ }
+
+ @Override
+ public void restoreState(Object[] state) {
+ //Since there's no need to maintain a state, nothing needs to be done here.
+ }
+}
+
+
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext
index f2a86a7eb..fa4336f4a 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext
@@ -1,12 +1,12 @@
#
-# Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
# in compliance with the License.
# You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
@@ -17,3 +17,4 @@
#
getProperty=org.wso2.extension.siddhi.execution.json.GetPropertyFunctionExtension
+getArray=org.wso2.extension.siddhi.execution.json.GetArrayFunctionExtension
\ No newline at end of file
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionTestCase.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/ExtensionTestCase.java
similarity index 64%
rename from components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionTestCase.java
rename to components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/ExtensionTestCase.java
index c1c49f788..761336a2d 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionTestCase.java
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/ExtensionTestCase.java
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,10 +18,10 @@
package org.wso2.extension.siddhi.execution.json;
-import junit.framework.Assert;
import org.apache.log4j.Logger;
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
import org.wso2.siddhi.core.ExecutionPlanRuntime;
import org.wso2.siddhi.core.SiddhiManager;
import org.wso2.siddhi.core.event.Event;
@@ -32,12 +32,12 @@ import org.wso2.extension.siddhi.execution.json.test.util.SiddhiTestHelper;
import java.util.concurrent.atomic.AtomicInteger;
-public class getPropertyFunctionTestCase {
- static final Logger log = Logger.getLogger(getPropertyFunctionTestCase.class);
+public class ExtensionTestCase {
+ static final Logger log = Logger.getLogger(ExtensionTestCase.class);
private AtomicInteger count = new AtomicInteger(0);
private volatile boolean eventArrived;
- @Before
+ @BeforeClass
public void init() {
count.set(0);
eventArrived = false;
@@ -85,4 +85,39 @@ public class getPropertyFunctionTestCase {
Assert.assertTrue(eventArrived);
executionPlanRuntime.shutdown();
}
+
+ @Test(dependsOnMethods = {"testGetPropertyFunctionExtension"})
+ public void testGetArrayFunctionExtension() throws InterruptedException {
+ count.set(0);
+ eventArrived = false;
+ log.info("GetArrayFunctionExtension TestCase");
+ SiddhiManager siddhiManager = new SiddhiManager();
+
+ String inStreamDefinition = "define stream inputStream (arg1 string, arg2 string);";
+ String query = ("@info(name = 'query1') from inputStream select json:getArray(arg1, arg2) "
+ + "as array insert into outputStream;");
+
+ ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
+
+ executionPlanRuntime.addCallback("query1", new QueryCallback() {
+ @Override
+ public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
+ EventPrinter.print(timeStamp, inEvents, removeEvents);
+ for (Event event : inEvents) {
+ count.incrementAndGet();
+ if (count.get() == 1) {
+ eventArrived = true;
+ }
+ }
+ }
+ });
+
+ InputHandler inputHandler = executionPlanRuntime.getInputHandler("inputStream");
+ executionPlanRuntime.start();
+ inputHandler.send(new Object[]{"Arg1","Arg2"});
+ SiddhiTestHelper.waitForEvents(100, 1, count, 60000);
+ Assert.assertEquals(1, count.get());
+ Assert.assertTrue(eventArrived);
+ executionPlanRuntime.shutdown();
+ }
}
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/resources/testng.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/resources/testng.xml
new file mode 100644
index 000000000..80918d253
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/resources/testng.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml
index b1e943e43..d1b3bc089 100644
--- a/components/test-coverage/pom.xml
+++ b/components/test-coverage/pom.xml
@@ -103,9 +103,13 @@
${basedir}/../${extensions}/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener
-
- ${basedir}/../${extensions}/siddhi-extensions/org.wso2.extension.siddhi.execution.json
-
+ ${extensions}/siddhi-extensions
+
+ ${basedir}/../${siddhi.extensions}/org.wso2.extension.siddhi.execution.json
+
+
+ ${basedir}/../${siddhi.extensions}/org.wso2.extension.siddhi.device
+
mobile-plugins
@@ -134,8 +138,9 @@
-
-
+
+
+
@@ -144,8 +149,11 @@
-
-
+
+
+
+
+
@@ -308,12 +316,22 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+