kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rha...@apache.org
Subject [kafka] branch 2.1 updated: HOTFIX: fix compile error in 2.1 branch (#7328)
Date Fri, 13 Sep 2019 21:38:12 GMT
This is an automated email from the ASF dual-hosted git repository.

rhauch pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 7f68a62  HOTFIX: fix compile error in 2.1 branch (#7328)
7f68a62 is described below

commit 7f68a626102b49ff05a1eee0656f21116646d21a
Author: Matthias J. Sax <matthias@confluent.io>
AuthorDate: Fri Sep 13 14:37:40 2019 -0700

    HOTFIX: fix compile error in 2.1 branch (#7328)
    
    Author: Matthias J. Sax <matthias@confluent.io>
    Reviewers: Bill Bejeck <bill@confluent.io>, Randall Hauch <rhauch@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 ea58333..66d0331 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));
     }


Mime
View raw message