Author: ataylor
Date: 2011-10-13 09:36:56 -0400 (Thu, 13 Oct 2011)
New Revision: 11531
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
Log:
fixed FileDeploymentTest
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
===================================================================
---
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java 2011-10-13
12:34:32 UTC (rev 11530)
+++
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java 2011-10-13
13:36:56 UTC (rev 11531)
@@ -63,8 +63,12 @@
FileDeploymentManagerTest.log.debug("Filename is " + filename);
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/test-classes/");
+ file.mkdirs();
+
+ file = new File("target/test-classes/" + filename);
+
FileDeploymentManagerTest.log.debug(file.getAbsoluteFile());
file.createNewFile();
@@ -92,6 +96,7 @@
finally
{
file.delete();
+ fdm.stop();
}
}
@@ -101,8 +106,12 @@
FileDeploymentManagerTest.log.debug("Filename is " + filename);
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/test-classes/");
+ file.mkdirs();
+
+ file = new File("target/test-classes/" + filename);
+
FileDeploymentManagerTest.log.debug(file.getAbsoluteFile());
file.createNewFile();
@@ -125,6 +134,7 @@
finally
{
file.delete();
+ fdm.stop();
}
}
@@ -138,10 +148,18 @@
String filename2 = "fdm_test_file.xml2";
String filename3 = "fdm_test_file.xml3";
- File file1 = new File("tests/tmpfiles/" + filename1);
- File file2 = new File("tests/tmpfiles/" + filename2);
- File file3 = new File("tests/tmpfiles/" + filename3);
+ File file1 = new File("target/test-classes/");
+ File file2 = new File("target/test-classes/");
+ File file3 = new File("target/test-classes/");
+ file1.mkdirs();
+ file2.mkdirs();
+ file3.mkdirs();
+
+ file1 = new File("target/test-classes/" + filename1);
+ file2 = new File("target/test-classes/" + filename2);
+ file3 = new File("target/test-classes/" + filename3);
+
file1.createNewFile();
file2.createNewFile();
file3.createNewFile();
@@ -222,9 +240,9 @@
file1.delete();
file2.delete();
file3.delete();
+ fdm.stop();
}
-
- fdm.stop();
+
}
public void testRedeploy() throws Exception
@@ -235,8 +253,12 @@
String filename = "fdm_test_file.xml1";
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/test-classes/");
+ file.mkdirs();
+
+ file = new File("target/test-classes/" + filename);
+
file.createNewFile();
long oldLastModified = file.lastModified();
@@ -286,8 +308,12 @@
String filename = "fdm_test_file.xml1";
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/test-classes/");
+ file.mkdirs();
+
+ file = new File("target/test-classes/" + filename);
+
file.createNewFile();
FakeDeployer deployer = new FakeDeployer(filename);
Show replies by date