diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java index d86a26067..45f66b536 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java @@ -524,14 +524,10 @@ public void testResumePublish() throws Exception { .setEnableMessageOrdering(true) .build(); - ApiFuture future1 = sendTestMessageWithOrderingKey(publisher, "m1", "orderA"); - ApiFuture future2 = sendTestMessageWithOrderingKey(publisher, "m2", "orderA"); - - assertFalse(future1.isDone()); - assertFalse(future2.isDone()); - // This exception should stop future publishing to the same key testPublisherServiceImpl.addPublishError(new StatusException(Status.INVALID_ARGUMENT)); + ApiFuture future1 = sendTestMessageWithOrderingKey(publisher, "m1", "orderA"); + ApiFuture future2 = sendTestMessageWithOrderingKey(publisher, "m2", "orderA"); try { future1.get();