diff options
Diffstat (limited to 'vnf-sdk-function-test/src')
-rw-r--r-- | vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/common/ServiceRegistration.java | 4 |
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 ."); } |