From 6b5d4bf05f5d0b21c62ebfc53e3fa35cae463dfb Mon Sep 17 00:00:00 2001 From: megala21 Date: Sat, 10 Jun 2017 23:46:24 +0530 Subject: [PATCH 1/3] Increasing the timeout --- .../common/extensions/CarbonServerManagerExtension.java | 3 ++- .../mobileDevice/MobileDeviceManagementWithNoDevices.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java index cd2074df..cbf21428 100644 --- a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java +++ b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java @@ -102,7 +102,8 @@ public class CarbonServerManagerExtension { } }); - ClientConnectionUtil.waitForPort(defaultHttpPort + this.portOffset, 300000L, false, (String)this.automationContext.getInstance().getHosts().get("default")); + ClientConnectionUtil.waitForPort(defaultHttpPort + this.portOffset, DEFAULT_START_STOP_WAIT_MS, false, (String)this + .automationContext.getInstance().getHosts().get("default")); long time = System.currentTimeMillis() + 60000L; while(true) { diff --git a/modules/integration/tests-integration/src/test/java/org/wso2/iot/integration/mobileDevice/MobileDeviceManagementWithNoDevices.java b/modules/integration/tests-integration/src/test/java/org/wso2/iot/integration/mobileDevice/MobileDeviceManagementWithNoDevices.java index 9202331b..1e729462 100644 --- a/modules/integration/tests-integration/src/test/java/org/wso2/iot/integration/mobileDevice/MobileDeviceManagementWithNoDevices.java +++ b/modules/integration/tests-integration/src/test/java/org/wso2/iot/integration/mobileDevice/MobileDeviceManagementWithNoDevices.java @@ -58,9 +58,10 @@ public class MobileDeviceManagementWithNoDevices extends TestBase { while (!checkScopes(Constants.APIApplicationRegistration.PERMISSION_LIST)) { TimeUnit.SECONDS.sleep(5); - long WAIT_TIME = 30000; + long WAIT_TIME = 40000; if (System.currentTimeMillis() - startTime > WAIT_TIME) { - Assert.fail("Required APIs are not deployed after waiting for " + WAIT_TIME + " time-out has happened"); + Assert.fail("Required APIs are not deployed after waiting for " + WAIT_TIME + " ms time-out has " + + "happened"); } } } From 2fc51040430c2386234bcc53306602ad785ebe22 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Tue, 13 Jun 2017 12:19:13 +0530 Subject: [PATCH 2/3] Fixing https://github.com/wso2/product-iots/issues/522. --- modules/distribution/src/core/bin/iot-server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/distribution/src/core/bin/iot-server.sh b/modules/distribution/src/core/bin/iot-server.sh index c57597e4..a3ef3be0 100755 --- a/modules/distribution/src/core/bin/iot-server.sh +++ b/modules/distribution/src/core/bin/iot-server.sh @@ -181,7 +181,7 @@ elif [ "$CMD" = "start" ]; then fi export CARBON_HOME=$CARBON_HOME # using nohup sh to avoid erros in solaris OS.TODO - nohup sh $CARBON_HOME/bin/wso2server.sh $args > /dev/null 2>&1 & + nohup sh $CARBON_HOME/bin/iot-server.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "stop" ]; then export CARBON_HOME=$CARBON_HOME @@ -200,7 +200,7 @@ elif [ "$CMD" = "restart" ]; then done # using nohup sh to avoid erros in solaris OS.TODO - nohup sh $CARBON_HOME/bin/wso2server.sh $args > /dev/null 2>&1 & + nohup sh $CARBON_HOME/bin/iot-server.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "test" ]; then JAVACMD="exec "$JAVACMD"" From 6ac04eba484baee21aad8d5c2479ccf36715cb63 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Tue, 13 Jun 2017 12:56:24 +0530 Subject: [PATCH 3/3] Fixing https://github.com/wso2/product-iots/issues/1000. --- modules/distribution/src/core/bin/analytics.sh | 8 ++------ modules/distribution/src/core/bin/broker.sh | 9 ++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/modules/distribution/src/core/bin/analytics.sh b/modules/distribution/src/core/bin/analytics.sh index 04b66792..6b924b76 100755 --- a/modules/distribution/src/core/bin/analytics.sh +++ b/modules/distribution/src/core/bin/analytics.sh @@ -61,10 +61,6 @@ ANALYTICS_INIT_SCRIPT="$CARBON_HOME/wso2/analytics/bin/wso2server.sh" # If the daemon is not there, then exit. -sh $ANALYTICS_INIT_SCRIPT $* & +$ANALYTICS_INIT_SCRIPT $* +exit; -trap "sh $ANALYTICS_INIT_SCRIPT stop; exit;" INT TERM -while : -do - sleep 60 -done diff --git a/modules/distribution/src/core/bin/broker.sh b/modules/distribution/src/core/bin/broker.sh index ea94ffc4..b3f1a715 100755 --- a/modules/distribution/src/core/bin/broker.sh +++ b/modules/distribution/src/core/bin/broker.sh @@ -61,10 +61,5 @@ BROKER_INIT_SCRIPT="$CARBON_HOME/wso2/broker/bin/wso2server.sh" # If the daemon is not there, then exit. -sh $BROKER_INIT_SCRIPT $* & - -trap "sh $BROKER_INIT_SCRIPT stop; exit;" INT TERM -while : -do - sleep 60 -done +$BROKER_INIT_SCRIPT $* +exit;