diff options
author | Timothy Farkas <timothyfarkas@apache.org> | 2017-11-09 14:25:53 -0800 |
---|---|---|
committer | Paul Rogers <progers@maprtech.com> | 2017-11-14 17:26:41 -0800 |
commit | acc5ed927e1fa4011ac1c3724d15197484b9f45b (patch) | |
tree | 345a96f3c5f038a464baa2c846ae2179712efa0a /contrib/storage-hbase | |
parent | c56de2f13a36d673f0c5836d44817137e64b91e4 (diff) |
DRILL-5783, DRILL-5841, DRILL-5894: Rationalize test temp directories
This change includes:
DRILL-5783:
- A unit test is created for the priority queue in the TopN operator.
- The code generation classes passed around a completely unused function registry reference in some places so it is removed.
- The priority queue had unused parameters for some of its methods so it is removed.
DRILL-5841:
- Created standardized temp directory classes DirTestWatcher, SubDirTestWatcher, and BaseDirTestWatcher. And updated all unit tests to use them.
DRILL-5894:
- Removed the dfs_test storage plugin for tests and replaced it with the already existing dfs storage plugin.
Misc:
- General code cleanup.
- Removed unnecessary use of String.format in the tests.
This closes #984
Diffstat (limited to 'contrib/storage-hbase')
3 files changed, 5 insertions, 5 deletions
diff --git a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java index b957347c8..9d4b4cda7 100644 --- a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java +++ b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java @@ -20,8 +20,8 @@ package org.apache.drill.hbase; import java.io.IOException; import java.util.List; -import org.apache.drill.BaseTestQuery; -import org.apache.drill.common.util.FileUtils; +import org.apache.drill.test.BaseTestQuery; +import org.apache.drill.common.util.DrillFileUtils; import org.apache.drill.exec.exception.SchemaChangeException; import org.apache.drill.exec.rpc.user.QueryDataBatch; import org.apache.drill.exec.store.StoragePluginRegistry; @@ -71,7 +71,7 @@ public class BaseHBaseTest extends BaseTestQuery { } protected String getPlanText(String planFile, String tableName) throws IOException { - return Files.toString(FileUtils.getResourceAsFile(planFile), Charsets.UTF_8) + return Files.toString(DrillFileUtils.getResourceAsFile(planFile), Charsets.UTF_8) .replaceFirst("\"hbase\\.zookeeper\\.property\\.clientPort\".*:.*\\d+", "\"hbase.zookeeper.property.clientPort\" : " + HBaseTestsSuite.getZookeeperPort()) .replace("[TABLE_NAME]", tableName); } diff --git a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/HBaseRecordReaderTest.java b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/HBaseRecordReaderTest.java index 5d94d248f..f1bcf3c03 100644 --- a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/HBaseRecordReaderTest.java +++ b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/HBaseRecordReaderTest.java @@ -22,7 +22,7 @@ import org.apache.drill.categories.SlowTest; import org.junit.Test; import org.junit.experimental.categories.Category; -import static org.apache.drill.TestBuilder.mapOf; +import static org.apache.drill.test.TestBuilder.mapOf; @Category({SlowTest.class, HbaseStorageTest.class}) public class HBaseRecordReaderTest extends BaseHBaseTest { diff --git a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestOrderedBytesConvertFunctions.java b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestOrderedBytesConvertFunctions.java index 6d1e3025c..2ef6d6840 100644 --- a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestOrderedBytesConvertFunctions.java +++ b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestOrderedBytesConvertFunctions.java @@ -25,7 +25,7 @@ import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.List; -import org.apache.drill.BaseTestQuery; +import org.apache.drill.test.BaseTestQuery; import org.apache.drill.categories.HbaseStorageTest; import org.apache.drill.categories.SlowTest; import org.apache.drill.exec.proto.UserBitShared.QueryType; |