From 0a18571b70757bb4dba741fe7ceac6c6805321a6 Mon Sep 17 00:00:00 2001 From: Murali-P Date: Wed, 15 Feb 2017 20:58:52 +0530 Subject: Fix Sonar Issue Resolved:VNFSDK-21 VNF SDK Function test Change-Id: I98e42d34990b089ff4c2cfdb8c8fb86c5d2c09ef Signed-off-by: Murali-P --- .../java/org/openo/vnfsdk/functest/common/ServiceRegistration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vnf-sdk-function-test/src/main') 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 ."); } -- cgit 1.2.3-korg