You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/01/02 03:50:31 UTC

[GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1167: [HUDI-484] Fix NPE when reading IncrementalPull.sqltemplate in HiveIncrementalPuller

vinothchandar commented on a change in pull request #1167: [HUDI-484] Fix NPE when reading IncrementalPull.sqltemplate in HiveIncrementalPuller
URL: https://github.com/apache/incubator-hudi/pull/1167#discussion_r362366023
 
 

 ##########
 File path: hudi-utilities/src/test/java/org/apache/hudi/utilities/TestHiveIncrementalPuller.java
 ##########
 @@ -0,0 +1,24 @@
+package org.apache.hudi.utilities;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestHiveIncrementalPuller {
+
+  private HiveIncrementalPuller.Config config;
+
+  @Before
+  public void init() {
+    config = new HiveIncrementalPuller.Config();
+  }
+
+  @Test
+  public void testInitHiveIncrementalPuller() throws Exception {
+
+    HiveIncrementalPuller puller = new HiveIncrementalPuller(config);
 
 Review comment:
   Not following this.. a constructor can either throw an exception or return a non-null object right? should we be using a try-catch and calling `fail` from the catch block to ensure the NPE is not thrown? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services