From 1bc171a562d597fb5334f752823b33d8fa84629a Mon Sep 17 00:00:00 2001 From: Irvi Aini <7439590+irvifa@users.noreply.github.com> Date: Tue, 7 Jul 2020 03:45:41 +0700 Subject: [PATCH] test: Reuse method to publish a message in PublisherImplTest (#277) We have sendTestMessage yet, there's still a test that does not use this method. --- .../java/com/google/cloud/pubsub/v1/PublisherImplTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 5ee5fdcfc..c68367601 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 @@ -153,8 +153,7 @@ public void testPublishByNumBatchedMessages() throws Exception { assertFalse(publishFuture3.isDone()); - ApiFuture publishFuture4 = - publisher.publish(PubsubMessage.newBuilder().setData(ByteString.copyFromUtf8("D")).build()); + ApiFuture publishFuture4 = sendTestMessage(publisher, "D"); assertEquals("3", publishFuture3.get()); assertEquals("4", publishFuture4.get());