diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestReference.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestReference.java index 80295ffa50d..0d18209a40c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestReference.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestReference.java @@ -43,8 +43,8 @@ public class TestReference { @Test public void testParsingWritableReference() throws IOException { // Read a Reference written w/ 0.94 out of the test data dir. - final String datafile = System.getProperty("project.build.testSourceDirectory", "src/test") + - File.separator + "data" + File.separator + + final String datafile = System.getProperty("test.build.classes", + "target/test-classes") + File.separator + "a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c"; FileSystem fs = FileSystem.get(HTU.getConfiguration()); Reference.read(fs, new Path(datafile)); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java index c339bb1f7d1..f2acbdccea4 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRecoveredEdits.java @@ -116,9 +116,9 @@ public class TestRecoveredEdits { Path regionDir = region.getRegionDir(hbaseRootDir, hri); Path recoveredEditsDir = WALSplitter.getRegionDirRecoveredEditsDir(regionDir); // This is a little fragile getting this path to a file of 10M of edits. - Path recoveredEditsFile = new Path(new Path( - System.getProperty("project.build.testSourceDirectory", "src" + Path.SEPARATOR + "test"), - "data"), "0000000000000016310"); + Path recoveredEditsFile = new Path( + System.getProperty("test.build.classes", "target/test-classes"), + "0000000000000016310"); // Copy this file under the region's recovered.edits dir so it is replayed on reopen. Path destination = new Path(recoveredEditsDir, recoveredEditsFile.getName()); fs.copyToLocalFile(recoveredEditsFile, destination); diff --git a/hbase-server/src/test/data/0000000000000016310 b/hbase-server/src/test/resources/0000000000000016310 similarity index 100% rename from hbase-server/src/test/data/0000000000000016310 rename to hbase-server/src/test/resources/0000000000000016310 diff --git a/hbase-server/src/test/data/a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c b/hbase-server/src/test/resources/a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c similarity index 100% rename from hbase-server/src/test/data/a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c rename to hbase-server/src/test/resources/a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c diff --git a/pom.xml b/pom.xml index c9fc6a0956c..cb28c84d5f3 100644 --- a/pom.xml +++ b/pom.xml @@ -575,6 +575,7 @@ ${test.output.tofile} target/jacoco.exec + ${test.build.classes} @@ -1305,6 +1306,8 @@ true 0.7.5.201505241946 1.0-beta-3 + + ${project.build.directory}/test-classes