Skip to content

Commit

Permalink
test: Remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpri10 committed May 14, 2024
1 parent 0ab8336 commit aa6a256
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception {
*/
@Test
public void testResumePublish() throws Exception {
// System.out.println("Starting testResumePublish");
Publisher publisher =
getTestPublisherBuilder()
.setBatchingSettings(
Expand All @@ -531,8 +530,6 @@ public void testResumePublish() throws Exception {
assertFalse(future1.isDone());
assertFalse(future2.isDone());

// System.out.println("Publish 1 and 2");

// This exception should stop future publishing to the same key
testPublisherServiceImpl.addPublishError(new StatusException(Status.INVALID_ARGUMENT));

Expand All @@ -542,14 +539,12 @@ public void testResumePublish() throws Exception {
future1.get();
fail("This should fail.");
} catch (ExecutionException e) {
// System.out.println("Message 1 failed");
}

try {
future2.get();
fail("This should fail.");
} catch (ExecutionException e) {
// System.out.println("Message 2 failed");
}

// Submit new requests with orderA that should fail.
Expand All @@ -561,15 +556,13 @@ public void testResumePublish() throws Exception {
fail("This should fail.");
} catch (ExecutionException e) {
assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause());
// System.out.println("Message 3 failed");
}

try {
future4.get();
fail("This should fail.");
} catch (ExecutionException e) {
assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause());
// System.out.println("Message 4 failed");
}

// Submit a new request with orderB, which should succeed
Expand All @@ -582,28 +575,19 @@ public void testResumePublish() throws Exception {
assertEquals("5", future5.get());
assertEquals("6", future6.get());

// System.out.println("Publish and receive 5 and 6");

// Resume publishing of "orderA", which should now succeed
publisher.resumePublish("orderA");

// System.out.println("Resume publishing of orderA");

ApiFuture<String> future7 = sendTestMessageWithOrderingKey(publisher, "m7", "orderA");
ApiFuture<String> future8 = sendTestMessageWithOrderingKey(publisher, "m8", "orderA");

testPublisherServiceImpl.addPublishResponse(
PublishResponse.newBuilder().addMessageIds("7").addMessageIds("8"));

// System.out.println("Publish of 7 and 8");

assertEquals("7", future7.get());
assertEquals("8", future8.get());

// System.out.println("Receive 7 and 8");

shutdownTestPublisher(publisher);
System.out.println("Ending testResumePublish");
}

@Test
Expand Down

0 comments on commit aa6a256

Please sign in to comment.