summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMurali-P <murali.p@huawei.com>2017-02-15 20:58:52 +0530
committerMurali-P <murali.p@huawei.com>2017-02-15 20:58:52 +0530
commit0a18571b70757bb4dba741fe7ceac6c6805321a6 (patch)
tree4bea1115336c69c7bd360a814f0ce32a20922683
parentbb5382a54c7d552cc1c7e53d8bcc0db5dd852db8 (diff)
Fix Sonar Issue
Resolved:VNFSDK-21 VNF SDK Function test Change-Id: I98e42d34990b089ff4c2cfdb8c8fb86c5d2c09ef Signed-off-by: Murali-P <murali.p@huawei.com>
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/common/ServiceRegistration.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/common/ServiceRegistration.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/common/ServiceRegistration.java
index 4dc0192..ca326ea 100644
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/common/ServiceRegistration.java
+++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/common/ServiceRegistration.java
@@ -39,10 +39,11 @@ public class ServiceRegistration implements Runnable {
while(!flag && retry < 1000) {
LOG.info("VNF-SDK function test microservice register.retry:" + retry);
retry++;
+
+ flag = MicroserviceBusConsumer.registerService(funcTestEntity);
if(retry >= 1000) {
flag = true;
}
- flag = MicroserviceBusConsumer.registerService(funcTestEntity);
if(flag == false) {
LOG.warn("microservice register failed, sleep 30S and try again.");
threadSleep(30000);
@@ -60,6 +61,7 @@ public class ServiceRegistration implements Runnable {
Thread.sleep(second);
} catch(InterruptedException error) {
LOG.error("thread sleep error.errorMsg:", error);
+ Thread.currentThread().interrupt();
}
LOG.info("sleep end .");
}