This is an automated email from the ASF dual-hosted git repository. rhauch pushed a commit to branch 2.2 in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.2 by this push: new 7f58c25 HOTFIX: fix compile error in 2.2 branch (#7327) 7f58c25 is described below commit 7f58c25b7b1eea583738f0c2e5b59d45509039cb Author: Matthias J. Sax <matth...@confluent.io> AuthorDate: Thu Sep 12 14:58:13 2019 -0700 HOTFIX: fix compile error in 2.2 branch (#7327) Author: Matthias J. Sax <matth...@confluent.io> Reviewers: Bill Bejeck <b...@confluent.io>, Randall Hauch <rha...@gmail.com> --- .../kafka/streams/processor/internals/RecordCollectorTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/RecordCollectorTest.java b/streams/src/test/java/org/apache/kafka/streams/processor/internals/RecordCollectorTest.java index 22fb2ec..d2f4cbb 100644 --- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/RecordCollectorTest.java +++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/RecordCollectorTest.java @@ -53,7 +53,6 @@ import java.util.concurrent.Future; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -168,7 +167,10 @@ public class RecordCollectorTest { final Map<TopicPartition, Long> offsets = collector.offsets(); assertThat(offsets.get(topicPartition), equalTo(2L)); - assertThrows(UnsupportedOperationException.class, () -> offsets.put(new TopicPartition(topic, 0), 50L)); + try { + offsets.put(new TopicPartition(topic, 0), 50L); + fail("Should have thrown UnsupportedOperationException"); + } catch (final UnsupportedOperationException expected) { } assertThat(collector.offsets().get(topicPartition), equalTo(2L)); }