Skip to content

Commit 0b42f88

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 1679 b: refs/heads/master c: bc66860 h: refs/heads/master i: 1677: ac00bc3 1675: bbe4bd1 1671: 4a2a73e 1663: 95b4bf0
1 parent e6d50c3 commit 0b42f88

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9d201a05bcbb7e9f0270ddf8d4cc78bba3f80b1e
2+
refs/heads/master: bc66860a5283ae6e596245907739af56d904b590
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: d1b373c30c176edc08692348167bec3a244bb823
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3

trunk/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/it/ITBigQueryTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,11 @@ public static void afterClass() throws ExecutionException, InterruptedException
197197
if (bigquery != null) {
198198
RemoteBigQueryHelper.forceDelete(bigquery, DATASET);
199199
}
200-
if (storage != null && !RemoteGcsHelper.forceDelete(storage, BUCKET, 10, TimeUnit.SECONDS)
201-
&& LOG.isLoggable(Level.WARNING)) {
202-
LOG.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
200+
if (storage != null) {
201+
boolean wasDeleted = RemoteGcsHelper.forceDelete(storage, BUCKET, 10, TimeUnit.SECONDS);
202+
if (!wasDeleted && LOG.isLoggable(Level.WARNING)) {
203+
LOG.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
204+
}
203205
}
204206
}
205207

trunk/gcloud-java-storage/src/test/java/com/google/gcloud/storage/it/ITStorageTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ public static void beforeClass() {
8888

8989
@AfterClass
9090
public static void afterClass() throws ExecutionException, InterruptedException {
91-
if (storage != null && !RemoteGcsHelper.forceDelete(storage, BUCKET, 5, TimeUnit.SECONDS)
92-
&& log.isLoggable(Level.WARNING)) {
93-
log.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
91+
if (storage != null) {
92+
boolean wasDeleted = RemoteGcsHelper.forceDelete(storage, BUCKET, 5, TimeUnit.SECONDS);
93+
if (!wasDeleted && log.isLoggable(Level.WARNING)) {
94+
log.log(Level.WARNING, "Deletion of bucket {0} timed out, bucket is not empty", BUCKET);
95+
}
9496
}
9597
}
9698

0 commit comments

Comments
 (0)