Skip to content

Commit

Permalink
Correct merge error with Kafka PR.
Browse files Browse the repository at this point in the history
Correct spacing with refactored code.
  • Loading branch information
dthompsn committed Aug 6, 2020
1 parent 4ad8d0f commit 797fbad
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void firstSubscribeAndPollingTest() throws InterruptedException {
//verify that the control loop is polling repeatedly. Normally there would be a delay but
//the kafkaConsumer has been mocked to return immediatly on poll
verify(kafkaConsumer, timeout(200).atLeast(5))
.poll(eq(KafkaController.POLL_TIMEOUT.getSeconds()));
.poll(eq(KafkaController.POLL_TIMEOUT));
assertEquals(1, subscribeCaptor.getValue().size());
assertTrue(subscribeCaptor.getValue().contains(topic1));
this.controller.stop(10, TimeUnit.MILLISECONDS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void testInvalidJsonMessage() throws ConnectorException {
final ForkliftConsumerI testConsumer = new ConstantMessageConsumer(sourceMessage);
final ForkliftConsumerI consumerWrapper = new RoleInputConsumerWrapper(testConsumer);

consumerWrapper.receive(1000);
consumerWrapper.receive(1000);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void testMessagesWithIdenticalFieldsAreEqual() {
final Map<Header, Object> testHeaders = Collections.singletonMap(Header.Priority, 6);

assertEquals(new RoleInputMessage(testRole, testId, testMessage, testProperties, testHeaders),
new RoleInputMessage(testRole, testId, testMessage, testProperties, testHeaders));
new RoleInputMessage(testRole, testId, testMessage, testProperties, testHeaders));
}

@Test
Expand All @@ -222,7 +222,7 @@ public void testMessagesWithDifferentFieldsAreNotEqual() {
final Map<Header, Object> testHeaders = Collections.singletonMap(Header.Priority, 6);

assertNotEquals(new RoleInputMessage(testRole, testId, testMessage, testProperties, testHeaders),
new RoleInputMessage("other-role", testId, testMessage, testProperties, testHeaders));
new RoleInputMessage("other-role", testId, testMessage, testProperties, testHeaders));
}

private static class TestAcknowledgmentMessage extends ForkliftMessage{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void testNullDeployment() throws IOException {
@Test
public void testNullArrayDeployment() throws IOException {
assertThrows(NullPointerException.class, () -> {
new ClassDeployment((Class<?>[]) null);
new ClassDeployment((Class<?>[]) null);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public void testDifferentSourcesAreNotEqual() {
final String otherTopic = "other-topic";

assertNotEquals(new GroupedTopicSource(testTopic, testGroup),
new GroupedTopicSource(otherTopic, testGroup));
new GroupedTopicSource(otherTopic, testGroup));

assertNotEquals(new GroupedTopicSource(testTopic, testGroup),
new TopicSource(testTopic));
new TopicSource(testTopic));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@ public class QueueSourceTest {
public void testSameQueuesAreEqual() {
final String testQueue = "test-queue";

assertEquals(new QueueSource(testQueue),
new QueueSource(testQueue));
assertEquals(new QueueSource(testQueue), new QueueSource(testQueue));
}

@Test
public void testDifferentQueuesAreNotEqual() {
assertNotEquals(new QueueSource("test-queue-1"),
new QueueSource("test-queue-2"));
assertNotEquals(new QueueSource("test-queue-1"), new QueueSource("test-queue-2"));
}

@Test
public void testDistinctFromTopic() {
final String testName = "test";
assertNotEquals(new QueueSource(testName),
new TopicSource(testName));
assertNotEquals(new QueueSource(testName), new TopicSource(testName));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public void testUndefinedRoles() {

@Test
public void testUndefinedRolesAreEqual() {
assertEquals(new RoleInputSource((String) null),
new RoleInputSource(""));
assertEquals(new RoleInputSource((String) null), new RoleInputSource(""));
}

@Test
Expand All @@ -39,8 +38,7 @@ public void testActionSourceIsTakenFromContext() {

final RoleInputSource roleInput = new RoleInputSource("TestRole");

assertEquals(new QueueSource("action-role-TestRole"),
roleInput.getActionSource(testContext));
assertEquals(new QueueSource("action-role-TestRole"), roleInput.getActionSource(testContext));
}

@Test
Expand Down

0 comments on commit 797fbad

Please sign in to comment.