amaliujia commented on a change in pull request #12830:
URL: https://github.com/apache/beam/pull/12830#discussion_r492300048



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/TestPubsubSignal.java
##########
@@ -239,6 +245,12 @@ public void waitForSuccess(Duration duration) throws 
IOException {
 
     String result = pollForResultForDuration(resultSubscriptionPath, duration);
 
+    try {
+      pubsub.deleteSubscription(resultSubscriptionPath);
+    } catch (IOException e) {
+      LOG.warn(String.format("Leaked PubSub subscription '%s'", 
resultSubscriptionPath));

Review comment:
       nit: make error will make it easier to be discovered.

##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/TestPubsubSignal.java
##########
@@ -239,6 +245,12 @@ public void waitForSuccess(Duration duration) throws 
IOException {
 
     String result = pollForResultForDuration(resultSubscriptionPath, duration);
 
+    try {
+      pubsub.deleteSubscription(resultSubscriptionPath);
+    } catch (IOException e) {
+      LOG.warn(String.format("Leaked PubSub subscription '%s'", 
resultSubscriptionPath));

Review comment:
       nit: Will LOG.error make it easier to be discovered?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to