diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java index 39d654832bf..848cd4f0bf8 100644 --- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java +++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java @@ -983,6 +983,7 @@ public class StreamTaskTest { } catch (final TaskMigratedException expected) { assertTrue(expected.getCause() instanceof ProducerFencedException); } + task = null; assertFalse(producer.transactionCommitted()); }