vkcelik commented on a change in pull request #3246: NIFI-5929 Support for IBM 
MQ multi-instance queue managers
URL: https://github.com/apache/nifi/pull/3246#discussion_r245932072
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/test/java/org/apache/nifi/jms/cf/JMSConnectionFactoryProviderTest.java
 ##########
 @@ -101,4 +101,157 @@ public void 
validateGetConnectionFactoryFailureIfServiceNotConfigured() throws E
         new JMSConnectionFactoryProvider().getConnectionFactory();
     }
 
+    @Test
+    public void validWithSingleTestBroker() throws Exception {
+        TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
+
+        JMSConnectionFactoryProvider cfProvider = new 
JMSConnectionFactoryProvider();
+        runner.addControllerService("cfProvider", cfProvider);
+
+        String clientLib = 
this.getClass().getResource("/dummy-lib.jar").toURI().toString();
+
+        runner.setProperty(cfProvider, 
JMSConnectionFactoryProvider.BROKER_URI, "myhost:1234");
+        runner.setProperty(cfProvider, 
JMSConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, clientLib);
+        runner.setProperty(cfProvider, 
JMSConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
+                "org.apache.nifi.jms.testcflib.TestConnectionFactory");
+
+        runner.assertValid(cfProvider);
 
 Review comment:
   Thanks for your valuable comment. My initial intent was to unit test the 
`setProperty(String propertyName, Object propertyValue)` method but realized 
that the tests did not execute this method. I kept the tests despite this 
realization with the purpose to ensure that future changes to validation will 
accept these broker URIs. 
   
   NIce idea with the sub-class! I will try to implement this

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


With regards,
Apache Git Services

Reply via email to