From a8fa24d7185d5345e746f8e2563afffe08f3bd6e Mon Sep 17 00:00:00 2001 From: hannahrogers-google <52459909+hannahrogers-google@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:19:27 -0800 Subject: [PATCH] fix: temporarily remove publisher tests causing timeouts (#1860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update PublisherImplTest.java * Update PublisherImplTest.java * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * Update PublisherImplTest.java * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update PublisherImplTest.java * fix: temporarily remove publisher tests causing timeouts * Update PublisherImplTest.java --------- Co-authored-by: Owl Bot --- .../google/cloud/pubsub/v1/PublisherImplTest.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 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 9985efc6b..9785b7716 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 @@ -56,7 +56,6 @@ import java.util.concurrent.TimeUnit; import org.easymock.EasyMock; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -501,7 +500,6 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); } - @Test /** * Make sure that resume publishing works as expected: * @@ -513,6 +511,10 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { *
  • publish with key orderA, which should now succeed * */ + /* + Temporarily disabled due to https://github.com/googleapis/java-pubsub/issues/1861. + TODO(maitrimangal): Enable once resolved. + @Test public void testResumePublish() throws Exception { Publisher publisher = getTestPublisherBuilder() @@ -538,13 +540,13 @@ public void testResumePublish() throws Exception { try { future1.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { } try { future2.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { } @@ -554,14 +556,14 @@ public void testResumePublish() throws Exception { try { future3.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); } try { future4.get(); - Assert.fail("This should fail."); + fail("This should fail."); } catch (ExecutionException e) { assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); } @@ -641,6 +643,7 @@ public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws E assertEquals(SequentialExecutorService.CallbackExecutor.CANCELLATION_EXCEPTION, e.getCause()); } } + */ private ApiFuture sendTestMessageWithOrderingKey( Publisher publisher, String data, String orderingKey) {