Fix Sonar Issue

Resolved:VNFSDK-21
VNF SDK Function test

Change-Id: I2e1687d928e26c47798a1fc52d1b34984777c275
Signed-off-by: Murali-P <murali.p@huawei.com>
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 d7ed67e..f6cffba 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
@@ -36,11 +36,15 @@
         LOG.info("start extsys microservice register");
         boolean flag = false;
         int retry = 0;
-        while(!flag || retry < 1000) {
+
+        while(!flag) {
             LOG.info("VNF-SDK function test microservice register.retry:" + retry);
             retry++;
 
             flag = MicroserviceBusConsumer.registerService(funcTestEntity);
+            if(retry >= 1000) {
+                flag = true;
+            }
 
             if(flag == false) {
                 LOG.warn("microservice register failed, sleep 30S and try again.");
diff --git a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java
index ba3bd5d..14db973 100644
--- a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java
+++ b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java
@@ -26,22 +26,23 @@
 
 public class FileUtilTest {
 
-    private String createDirPath = "C:/Users/Administrator/Desktop/Unzip";
+    private String createDirPath = "." + File.separator + "tempvnf";
 
-    private String deleteDirPath = "D:/deletefolder";
+    private String deleteDirPath = createDirPath;
 
     private String zipFileName = "src/test/resources/RobotScript.zip";
 
-    private String extractZip = "D:/Test/AA";
-
-    private String getDirectory = "D:/Test/AA";
-
     @Test
     public void testCreateDirectory() {
         assertTrue(FileUtil.createDirectory(createDirPath));
     }
 
     @Test
+    public void testDeleteDirectory() {
+        FileUtil.deleteDirectory(deleteDirPath);
+    }
+
+    @Test
     public void testDeleteFile() {
         assertTrue(FileUtil.deleteFile(new File(deleteDirPath)));
     }