diff --git a/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java b/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java index 18bece5d2de4..b8a98e97a9c7 100644 --- a/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java +++ b/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java @@ -19,7 +19,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import com.google.api.gax.core.ExecutorProvider; import com.google.api.gax.core.FixedExecutorProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.core.NoCredentialsProvider; @@ -37,10 +36,6 @@ import io.grpc.StatusException; import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -117,33 +112,6 @@ public void testFailedChannel_recoverableError_channelReopened() throws Exceptio subscriber.stopAsync().awaitTerminated(); } - @Test - public void testFailedChannelTerminated() throws InterruptedException, TimeoutException { - final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(5); - ExecutorProvider provider = - new ExecutorProvider() { - @Override - public boolean shouldAutoClose() { - return true; - } - - @Override - public ScheduledExecutorService getExecutor() { - return scheduledExecutorService; - } - }; - - try { - Subscriber subscriber = - startSubscriber( - getTestSubscriberBuilder(testReceiver).setSystemExecutorProvider(provider)); - subscriber.stopAsync().awaitTerminated(10, TimeUnit.SECONDS); - assertTrue(scheduledExecutorService.awaitTermination(10, TimeUnit.SECONDS)); - } finally { - scheduledExecutorService.shutdownNow(); - } - } - @Test(expected = IllegalStateException.class) public void testFailedChannel_fatalError_subscriberFails() throws Exception { Subscriber subscriber =