HOTFIX: fix compile error in 2.0 branch (#7329)

Author: Matthias J. Sax <matthias@confluent.io>
Reviewers: Bill Bejeck <bill@confluent.io>, Randall Hauch <rhauch@gmail.com>
This commit is contained in:
Matthias J. Sax 2019-09-13 10:15:48 -07:00 committed by Randall Hauch
parent 9b35df9523
commit e30ae14803
1 changed files with 5 additions and 3 deletions

View File

@ -50,10 +50,9 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
import static org.hamcrest.CoreMatchers.equalTo;
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;
@ -171,7 +170,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));
}