Skip to content

Commit

Permalink
Minor fix in ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay Kannan committed Feb 11, 2016
1 parent 9d201a0 commit bc66860
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ public static void afterClass() throws ExecutionException, InterruptedException
if (bigquery != null) {
RemoteBigQueryHelper.forceDelete(bigquery, DATASET);
}
if (storage != null && !RemoteGcsHelper.forceDelete(storage, BUCKET, 10, TimeUnit.SECONDS)
&& LOG.isLoggable(Level.WARNING)) {
LOG.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
if (storage != null) {
boolean wasDeleted = RemoteGcsHelper.forceDelete(storage, BUCKET, 10, TimeUnit.SECONDS);
if (!wasDeleted && LOG.isLoggable(Level.WARNING)) {
LOG.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ public static void beforeClass() {

@AfterClass
public static void afterClass() throws ExecutionException, InterruptedException {
if (storage != null && !RemoteGcsHelper.forceDelete(storage, BUCKET, 5, TimeUnit.SECONDS)
&& log.isLoggable(Level.WARNING)) {
log.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
if (storage != null) {
boolean wasDeleted = RemoteGcsHelper.forceDelete(storage, BUCKET, 5, TimeUnit.SECONDS);
if (!wasDeleted && log.isLoggable(Level.WARNING)) {
log.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
}
}
}

Expand Down

0 comments on commit bc66860

Please sign in to comment.