Author: orudyy
Date: Fri Apr 25 11:45:43 2014
New Revision: 1590003

URL: http://svn.apache.org/r1590003
Log:
QPID-5715: Change test utility method for virtual host configuration store 
creation to wipe out the store folder before creation a store

Modified:
    
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java

Modified: 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java?rev=1590003&r1=1590002&r2=1590003&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java
 (original)
+++ 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java
 Fri Apr 25 11:45:43 2014
@@ -23,6 +23,7 @@ package org.apache.qpid.test.utils;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import java.io.File;
 import java.lang.management.ManagementFactory;
 import java.lang.management.ThreadInfo;
 import java.lang.management.ThreadMXBean;
@@ -40,6 +41,7 @@ import org.apache.qpid.server.store.Dura
 import org.apache.qpid.server.store.JsonFileConfigStore;
 import org.apache.qpid.server.store.MemoryMessageStore;
 import org.apache.qpid.server.virtualhost.StandardVirtualHost;
+import org.apache.qpid.util.FileUtils;
 import org.apache.qpid.util.Strings;
 
 public class TestUtils
@@ -95,6 +97,12 @@ public class TestUtils
         String storePath = 
(String)nodeAttributes.get(DurableConfigurationStore.STORE_PATH);
         String path = Strings.expand(storePath, false, 
Strings.JAVA_SYS_PROPS_RESOLVER, Strings.ENV_VARS_RESOLVER);
 
+        File pathFile = new File(path);
+        if (pathFile.exists())
+        {
+            FileUtils.delete(pathFile, true);
+        }
+
         Map<String, Object> attributes =  new HashMap<String, 
Object>(nodeAttributes);
         attributes.put(DurableConfigurationStore.STORE_PATH, path);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to