Skip to content

Commit

Permalink
Fix KafkaSourceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Slechta committed Feb 13, 2018
1 parent fb675a0 commit 57eb296
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public void testNoPartitions() {
public void testPartitions() {
Node leaderNode = new Node(1, "localhost", 3333);
PartitionInfo pi = new PartitionInfo("topic", 0, leaderNode, null, null);
tryGetPartitions(Collections.emptyList());
tryGetPartitions(Collections.singletonList(pi));
}

@Test(expected = IllegalStateException.class)
@SuppressWarnings("unchecked")
public void testNoLeader() {
PartitionInfo pi = new PartitionInfo("topic", 0, Node.noNode(), null, null);
tryGetPartitions(Collections.emptyList());
tryGetPartitions(Collections.singletonList(pi));
}

public void tryGetPartitions(List<PartitionInfo> partitions) {
Expand Down

0 comments on commit 57eb296

Please sign in to comment.