nicoloboschi commented on code in PR #19836:
URL: https://github.com/apache/pulsar/pull/19836#discussion_r1138332834


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java:
##########
@@ -449,6 +449,8 @@ void processArguments() throws Exception {
 
             if (sourceType != null) {
                 sourceConfig.setArchive(validateSourceType(sourceType));
+            } else if (sourceConfig.getSourceType() != null) {
+                sourceConfig.setArchive(validateSourceType(sourceType));

Review Comment:
   ```suggestion
                   
sourceConfig.setArchive(validateSourceType(sourceConfig.getSourceType()));
   ```



##########
pulsar-client-tools/src/test/java/org/apache/pulsar/admin/cli/TestCmdSources.java:
##########
@@ -412,6 +412,15 @@ public void 
testBatchSourceConfigMissingDiscoveryTriggererClassName() throws Exc
         expectedSourceConfig.setBatchSourceConfig(batchSourceConfig);
         testCmdSourceConfigFile(testSourceConfig, expectedSourceConfig);
     }
+
+    @Test(expectedExceptions = ParameterException.class, 
expectedExceptionsMessageRegExp = "Invalid source type 'foo' " +

Review Comment:
   could you add a happy path test ? 



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