apilloud commented on a change in pull request #14734:
URL: https://github.com/apache/beam/pull/14734#discussion_r627005380



##########
File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/meta/provider/pubsub/PubsubTableProviderIT.java
##########
@@ -439,8 +440,20 @@ public void testSQLLimit() throws Exception {
                   return result.build();
                 });
 
-    eventsTopic.assertSubscriptionEventuallyCreated(
-        pipeline.getOptions().as(GcpOptions.class).getProject(), 
Duration.standardMinutes(5));
+    try {
+      eventsTopic.assertSubscriptionEventuallyCreated(
+          pipeline.getOptions().as(GcpOptions.class).getProject(), 
Duration.standardMinutes(5));
+    } catch (AssertionError assertionError) {
+      // If we timed out, check if the forked thread had an exception. If 
something
+      // did go wrong there this call will raise an ExecutionException, which 
we allow to bubble
+      // up.
+      try {
+        queryResult.get(1, TimeUnit.SECONDS);

Review comment:
       Could you just use `queryResult.get()` here? (Wouldn't the forked thread 
have an exception before the timeout?)




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to