ableegoldman commented on a change in pull request #8900:
URL: https://github.com/apache/kafka/pull/8900#discussion_r443854750



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/integration/EosIntegrationTest.java
##########
@@ -203,6 +208,34 @@ public void 
shouldBeAbleToRunWithTwoSubtopologiesAndMultiplePartitions() throws
         runSimpleCopyTest(1, MULTI_PARTITION_INPUT_TOPIC, 
MULTI_PARTITION_THROUGH_TOPIC, MULTI_PARTITION_OUTPUT_TOPIC, false, eosConfig);
     }
 
+    // This is technically a purely producer-client test, but since we're 
relying on the specific error message being
+    // thrown we should make sure it can't change without us noticing. Once 
KAFKA-10186 is resolved we should fix this
+    @Test
+    public void testExceptionForPendingUnflushedDataWhenTransactionIsAborted() 
 {
+        final Map<String, Object> configs = new HashMap<>();
+        configs.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, 
CLUSTER.bootstrapServers());
+        configs.put("client.id", "client-1");
+        configs.put(ProducerConfig.TRANSACTIONAL_ID_CONFIG, "txnId");
+
+        final KafkaProducer<String, String> producer =
+            new KafkaProducer<>(configs, new StringSerializer(), new 
StringSerializer());
+
+        final ProducerRecord<String, String> record = new 
ProducerRecord<>(SINGLE_PARTITION_INPUT_TOPIC, "value");
+
+        producer.initTransactions();
+        producer.beginTransaction();
+
+        producer.send(record);

Review comment:
       Nope, that just slipped in there 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to