You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by xv...@apache.org on 2020/03/28 01:23:07 UTC

[druid] branch 0.18.0 updated: fix nullhandling exceptions related to test ordering (#9570)

This is an automated email from the ASF dual-hosted git repository.

xvrl pushed a commit to branch 0.18.0
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/0.18.0 by this push:
     new 3f9cce9  fix nullhandling exceptions related to test ordering (#9570)
3f9cce9 is described below

commit 3f9cce99d9f33a2b7bd787d6f258d94d8a615751
Author: Xavier Léauté <xv...@apache.org>
AuthorDate: Fri Mar 27 09:46:31 2020 -0700

    fix nullhandling exceptions related to test ordering (#9570)
    
    * fix nullhandling exceptions related to test ordering
    
    Tests might get executed in different order depending on the maven
    version and the test environment. This may lead to "NullHandling module
    not initialized" errors for some tests where we do not initialize
    null-handling explicitly.
    
    * use InitializedNullHandlingTest
---
 extensions-core/hdfs-storage/pom.xml                               | 7 +++++++
 .../org/apache/druid/inputsource/hdfs/HdfsInputSourceTest.java     | 3 ++-
 .../indexing/seekablestream/RecordSupplierInputSourceTest.java     | 4 +++-
 .../test/java/org/apache/druid/segment/SchemalessTestFullTest.java | 3 ++-
 .../java/org/apache/druid/segment/SchemalessTestSimpleTest.java    | 4 +++-
 5 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/extensions-core/hdfs-storage/pom.xml b/extensions-core/hdfs-storage/pom.xml
index 03ece8a..8c609fb 100644
--- a/extensions-core/hdfs-storage/pom.xml
+++ b/extensions-core/hdfs-storage/pom.xml
@@ -422,6 +422,13 @@
         <version>${project.parent.version}</version>
         <scope>test</scope>
       </dependency>
+      <dependency>
+        <groupId>org.apache.druid</groupId>
+        <artifactId>druid-core</artifactId>
+        <version>${project.parent.version}</version>
+        <classifier>tests</classifier>
+        <scope>test</scope>
+      </dependency>
     </dependencies>
 
 </project>
diff --git a/extensions-core/hdfs-storage/src/test/java/org/apache/druid/inputsource/hdfs/HdfsInputSourceTest.java b/extensions-core/hdfs-storage/src/test/java/org/apache/druid/inputsource/hdfs/HdfsInputSourceTest.java
index 92b4ad8..d2c7820 100644
--- a/extensions-core/hdfs-storage/src/test/java/org/apache/druid/inputsource/hdfs/HdfsInputSourceTest.java
+++ b/extensions-core/hdfs-storage/src/test/java/org/apache/druid/inputsource/hdfs/HdfsInputSourceTest.java
@@ -34,6 +34,7 @@ import org.apache.druid.data.input.impl.DimensionsSpec;
 import org.apache.druid.data.input.impl.TimestampSpec;
 import org.apache.druid.java.util.common.parsers.CloseableIterator;
 import org.apache.druid.storage.hdfs.HdfsStorageDruidModule;
+import org.apache.druid.testing.InitializedNullHandlingTest;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
@@ -64,7 +65,7 @@ import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
 @RunWith(Enclosed.class)
-public class HdfsInputSourceTest
+public class HdfsInputSourceTest extends InitializedNullHandlingTest
 {
   private static final String PATH = "/foo/bar";
   private static final Configuration CONFIGURATION = new Configuration();
diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/RecordSupplierInputSourceTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/RecordSupplierInputSourceTest.java
index b03de85..10d6bf8 100644
--- a/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/RecordSupplierInputSourceTest.java
+++ b/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/RecordSupplierInputSourceTest.java
@@ -35,6 +35,7 @@ import org.apache.druid.indexing.seekablestream.common.StreamPartition;
 import org.apache.druid.java.util.common.DateTimes;
 import org.apache.druid.java.util.common.StringUtils;
 import org.apache.druid.java.util.common.parsers.CloseableIterator;
+import org.apache.druid.testing.InitializedNullHandlingTest;
 import org.junit.Assert;
 import org.junit.Rule;
 import org.junit.Test;
@@ -54,8 +55,9 @@ import java.util.concurrent.ThreadLocalRandom;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-public class RecordSupplierInputSourceTest
+public class RecordSupplierInputSourceTest extends InitializedNullHandlingTest
 {
+
   private static final int NUM_COLS = 16;
   private static final int NUM_ROWS = 128;
   private static final String TIMESTAMP_STRING = "2019-01-01";
diff --git a/processing/src/test/java/org/apache/druid/segment/SchemalessTestFullTest.java b/processing/src/test/java/org/apache/druid/segment/SchemalessTestFullTest.java
index eb26630..dcd4eee 100644
--- a/processing/src/test/java/org/apache/druid/segment/SchemalessTestFullTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/SchemalessTestFullTest.java
@@ -60,6 +60,7 @@ import org.apache.druid.query.topn.TopNResultValue;
 import org.apache.druid.segment.writeout.OffHeapMemorySegmentWriteOutMediumFactory;
 import org.apache.druid.segment.writeout.SegmentWriteOutMediumFactory;
 import org.apache.druid.segment.writeout.TmpFileSegmentWriteOutMediumFactory;
+import org.apache.druid.testing.InitializedNullHandlingTest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -73,7 +74,7 @@ import java.util.Map;
 /**
  */
 @RunWith(Parameterized.class)
-public class SchemalessTestFullTest
+public class SchemalessTestFullTest extends InitializedNullHandlingTest
 {
   @Parameterized.Parameters
   public static Collection<?> constructorFeeder()
diff --git a/processing/src/test/java/org/apache/druid/segment/SchemalessTestSimpleTest.java b/processing/src/test/java/org/apache/druid/segment/SchemalessTestSimpleTest.java
index 590ba5b..2d66259 100644
--- a/processing/src/test/java/org/apache/druid/segment/SchemalessTestSimpleTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/SchemalessTestSimpleTest.java
@@ -57,6 +57,7 @@ import org.apache.druid.query.topn.TopNQueryBuilder;
 import org.apache.druid.query.topn.TopNResultValue;
 import org.apache.druid.segment.incremental.IncrementalIndex;
 import org.apache.druid.segment.writeout.SegmentWriteOutMediumFactory;
+import org.apache.druid.testing.InitializedNullHandlingTest;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -72,8 +73,9 @@ import java.util.List;
 /**
  */
 @RunWith(Parameterized.class)
-public class SchemalessTestSimpleTest
+public class SchemalessTestSimpleTest extends InitializedNullHandlingTest
 {
+
   @Parameterized.Parameters
   public static Collection<?> constructorFeeder()
   {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org