Skip to content

Commit

Permalink
fix exception test, copy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens committed Jul 16, 2021
1 parent 05ebcc0 commit 368533a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@
* </p>
*
* <p>
* Throughout the lifecycle of the consumer, records get promoted from buffered to flushed to
* committed. A record when it is received is immediately buffered. When the buffer fills up, all
* buffered records are flushed out of memory using the user-provided recordWriter. When this flush
* happens, a state message is moved from pending to flushed. On close, if the user-provided onClose
* function is successful, then the flushed state record is considered committed and is then
* emitted. We expect this class to only ever emit either 1 state message (in the case of a full or
* partial success) or 0 state messages (in the case where the onClose step was never reached or did
* not complete without exception).
* Throughout the lifecycle of the consumer, messages get promoted from buffered to flushed to
* committed. A record message when it is received is immediately buffered. When the buffer fills
* up, all buffered records are flushed out of memory using the user-provided recordWriter. When
* this flush happens, a state message is moved from pending to flushed. On close, if the
* user-provided onClose function is successful, then the flushed state record is considered
* committed and is then emitted. We expect this class to only ever emit either 1 state message (in
* the case of a full or partial success) or 0 state messages (in the case where the onClose step
* was never reached or did not complete without exception).
* </p>
*
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void testExceptionDuringOnClose() throws Exception {
consumeRecords(consumer, expectedRecordsBatch1);
consumer.accept(STATE_MESSAGE1);
consumeRecords(consumer, expectedRecordsBatch2);
consumer.close();
assertThrows(IllegalStateException.class, () -> consumer.close());

verifyStartAndClose();

Expand Down

0 comments on commit 368533a

Please sign in to comment.