ableegoldman commented on a change in pull request #8963: URL: https://github.com/apache/kafka/pull/8963#discussion_r449220447
########## File path: streams/src/test/java/org/apache/kafka/streams/integration/EosBetaUpgradeIntegrationTest.java ########## @@ -147,6 +152,25 @@ private final AtomicInteger commitCounterClient2 = new AtomicInteger(-1); private final AtomicInteger commitRequested = new AtomicInteger(0); + private final AtomicBoolean requestCommit = new AtomicBoolean(false); + private static class CommitPunctuator implements Punctuator { + final ProcessorContext context; + final AtomicBoolean requestCommit; + + public CommitPunctuator(final ProcessorContext context, final AtomicBoolean requestCommit) { + this.context = context; + this.requestCommit = requestCommit; + } + + @Override + public void punctuate(final long timestamp) { + if (requestCommit.get()) { + context.commit(); + requestCommit.set(false); + } Review comment: This is only meant to be used when there's a single thread (and single instance running). I just wanted to put in a quick fix for now--I'll leave a comment to warn our future selves that we'll have to tighten this up if we want to extend the test or use it elsewhere with multiple threads/instances ---------------------------------------------------------------- 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