You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/10/11 19:00:05 UTC

[GitHub] [kafka] C0urante commented on a change in pull request #10528: KAFKA-12497: Skip unnecessary source task offset commits

C0urante commented on a change in pull request #10528:
URL: https://github.com/apache/kafka/pull/10528#discussion_r726506141



##########
File path: connect/runtime/src/test/java/org/apache/kafka/connect/storage/OffsetStorageWriterTest.java
##########
@@ -214,6 +215,12 @@ public void testCancelAfterAwaitFlush() throws Exception {
         PowerMock.verifyAll();
     }
 
+    private void assertBeginFlush(boolean shouldFlush) {
+        Consumer<Boolean> assertion = shouldFlush ? Assert::assertTrue : Assert::assertFalse;
+        assertion.accept(writer.willFlush());
+        assertion.accept(writer.beginFlush());

Review comment:
       Yeah, good point. Thought it would make messages clearer for failed assertions but the difference isn't worth the unreadable code.




-- 
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.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org