[ https://issues.apache.org/jira/browse/BEAM-13402?focusedWorklogId=701670&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-701670 ]
ASF GitHub Bot logged work on BEAM-13402: ----------------------------------------- Author: ASF GitHub Bot Created on: 28/Dec/21 19:43 Start Date: 28/Dec/21 19:43 Worklog Time Spent: 10m Work Description: ibzib commented on a change in pull request #16215: URL: https://github.com/apache/beam/pull/16215#discussion_r776049548 ########## File path: sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/pubsublite/internal/PubsubLiteSinkTest.java ########## @@ -207,32 +189,4 @@ public void exceptionMixedWithOK() throws Exception { assertThat(statusOr.get().code(), equalTo(Code.INTERNAL)); exec.shutdownNow(); } - - @Test - public void listenerExceptionOnBundleFinish() throws Exception { - Message message1 = Message.builder().build(); - SettableApiFuture<MessageMetadata> future = SettableApiFuture.create(); - - SettableApiFuture<Void> publishFuture = SettableApiFuture.create(); - when(publisher.publish(message1)) - .thenAnswer( - args -> { - publishFuture.set(null); - return future; - }); - Future<?> executorFuture = - Executors.newSingleThreadExecutor() - .submit( - () -> { - PipelineExecutionException e = - assertThrows(PipelineExecutionException.class, () -> runWith(message1)); - Optional<CheckedApiException> statusOr = ExtractStatus.extract(e.getCause()); - assertTrue(statusOr.isPresent()); - assertThat(statusOr.get().code(), equalTo(Code.INTERNAL)); - }); - publishFuture.get(); - listener.failed(null, new CheckedApiException(Code.INTERNAL).underlying); - future.set(MessageMetadata.of(Partition.of(1), Offset.of(2))); - executorFuture.get(); - } Review comment: > Yes, the publisher is managed by PublisherCache. When the publisher is failed, the publish() call will just throw, causing the bundle to be retried. Can we modify the test to mock PublisherCache etc. and check that behavior then, instead of deleting it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 701670) Time Spent: 10h (was: 9h 50m) > Pub/Sub Lite commits can take 10s of hours without completing > ------------------------------------------------------------- > > Key: BEAM-13402 > URL: https://issues.apache.org/jira/browse/BEAM-13402 > Project: Beam > Issue Type: Bug > Components: io-java-gcp > Reporter: Daniel Collins > Priority: P2 > Time Spent: 10h > Remaining Estimate: 0h > > [https://github.com/googleapis/gax-java/issues/1577] filed upstream -- This message was sent by Atlassian Jira (v8.20.1#820001)