szaboferee commented on a change in pull request #3439: NIFI-6218 Support 
setting transactional.id in PublishKafka/PublishKaf…
URL: https://github.com/apache/nifi/pull/3439#discussion_r288062877
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-0-11-processors/src/test/java/org/apache/nifi/processors/kafka/pubsub/TestPublisherPool.java
 ##########
 @@ -65,5 +70,40 @@ public void testPoisonedLeaseNotReturnedToPool() {
         lease.close();
         assertEquals(0, pool.available());
     }
+    @Test
+    public void testUseTransactionWithUUID() {
+        final Map<String, Object> kafkaProperties = new HashMap<>();
+        kafkaProperties.put("bootstrap.servers", "localhost:1111");
+        kafkaProperties.put("key.serializer", 
ByteArraySerializer.class.getName());
+        kafkaProperties.put("value.serializer", 
ByteArraySerializer.class.getName());
 
+        final PublisherPool pool = new PublisherPool(kafkaProperties, 
Mockito.mock(ComponentLog.class), 1024 * 1024, 1000L, true, null, null, 
StandardCharsets.UTF_8);
+        PublisherLease publisherLease = pool.obtainPublisher();
+
+        Producer producer = (Producer) 
Whitebox.getInternalState(publisherLease, "producer");
 
 Review comment:
   thank you for the feedback, I have changed the implementation so I could 
avoid using reflection

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to