activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6372
Date Sat, 30 Jul 2016 17:01:35 GMT
Repository: activemq
Updated Branches:
  refs/heads/master b1c4b1871 -> 71bb54f94


https://issues.apache.org/jira/browse/AMQ-6372

Fixing test so that test DataFile is written to a temporary directory
instead of the main activemq-kahadb-store directory.  This prevents git
from picking up the test file


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/71bb54f9
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/71bb54f9
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/71bb54f9

Branch: refs/heads/master
Commit: 71bb54f94c9554f24e502bccd40231b80da56740
Parents: b1c4b18
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Sat Jul 30 12:59:10 2016 -0400
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Sat Jul 30 12:59:10 2016 -0400

----------------------------------------------------------------------
 .../disk/journal/DataFileAccessorPoolTest.java       | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/71bb54f9/activemq-kahadb-store/src/test/java/org/apache/activemq/store/kahadb/disk/journal/DataFileAccessorPoolTest.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/test/java/org/apache/activemq/store/kahadb/disk/journal/DataFileAccessorPoolTest.java
b/activemq-kahadb-store/src/test/java/org/apache/activemq/store/kahadb/disk/journal/DataFileAccessorPoolTest.java
index bb8f16b..7767e0f 100644
--- a/activemq-kahadb-store/src/test/java/org/apache/activemq/store/kahadb/disk/journal/DataFileAccessorPoolTest.java
+++ b/activemq-kahadb-store/src/test/java/org/apache/activemq/store/kahadb/disk/journal/DataFileAccessorPoolTest.java
@@ -16,19 +16,24 @@
  */
 package org.apache.activemq.store.kahadb.disk.journal;
 
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-
-import java.io.File;
-
-import static org.junit.Assert.assertEquals;
+import org.junit.rules.TemporaryFolder;
 
 public class DataFileAccessorPoolTest {
     private Mockery context;
 
+    @Rule
+    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
     @Before
     public void setUp() throws Exception {
         context = new Mockery() {
@@ -47,7 +52,7 @@ public class DataFileAccessorPoolTest {
 
         context.checking(new Expectations(){{exactly(1).of(journal).getInflightWrites();}});
 
-        DataFile dataFile = new DataFile(new File("aa"), 1);
+        DataFile dataFile = new DataFile(new File(temporaryFolder.getRoot(), "aa"), 1);
         underTest.closeDataFileAccessor(underTest.openDataFileAccessor(dataFile));
 
         assertEquals("one in the pool", 1, underTest.size());


Mime
View raw message