shibd commented on code in PR #21675:
URL: https://github.com/apache/pulsar/pull/21675#discussion_r1420050239


##########
pulsar-io/influxdb/src/test/java/org/apache/pulsar/io/influxdb/v1/InfluxDBSinkConfigTest.java:
##########
@@ -85,12 +123,13 @@ public final void validValidateTest() throws IOException {
         map.put("batchTimeMs", "1000");
         map.put("batchSize", "100");
 
-        InfluxDBSinkConfig config = InfluxDBSinkConfig.load(map);
+        SinkContext sinkContext = Mockito.mock(SinkContext.class);
+        InfluxDBSinkConfig config = InfluxDBSinkConfig.load(map, sinkContext);
         config.validate();
     }
 
-    @Test(expectedExceptions = NullPointerException.class,
-        expectedExceptionsMessageRegExp = "influxdbUrl property not set.")
+    @Test(expectedExceptions = IllegalArgumentException.class,
+        expectedExceptionsMessageRegExp = "influxdbUrl cannot be null")

Review Comment:
   I do not think so. It never hits the second check logic, right? We should 
keep the code uniform and clear.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to