Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/131#discussion_r45688132
--- Diff:
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/processors/kafka/TestGetKafka.java
---
@@ -45,13 +45,18 @@ public static void configureLogging() {
}
@Test
- @Ignore("Intended only for local tests to verify functionality.")
public void testIntegrationLocally() {
+ EmbeddedKafka kafka = new EmbeddedKafka();
+ kafka.start();
+
+ kafka.addTopic("testX", 1);
+ kafka.sendMessage("testX");
+
final TestRunner runner =
TestRunners.newTestRunner(GetKafka.class);
- runner.setProperty(GetKafka.ZOOKEEPER_CONNECTION_STRING,
"192.168.0.101:2181");
+ runner.setProperty(GetKafka.ZOOKEEPER_CONNECTION_STRING,
"localhost:2181");
--- End diff --
If we are running an embedded service here, can we use a port of 0?
Expecting to open a specific port is dangerous in unit tests and often results
in unit test failures.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---