Skip to content

Commit d901dc5

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 4507 b: refs/heads/logging-alpha c: bc66860 h: refs/heads/master i: 4505: 7544dc5 4503: b61118c
1 parent 9e9abf8 commit d901dc5

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
@@ -12,7 +12,7 @@ refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
1414
refs/heads/gcs-nio: 283aeaf15efdcf3621eb6859f05e55ad7764375d
15-
refs/heads/logging-alpha: 9d201a05bcbb7e9f0270ddf8d4cc78bba3f80b1e
15+
refs/heads/logging-alpha: bc66860a5283ae6e596245907739af56d904b590
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
1818
refs/tags/v0.1.2: 3eb3fe866ba22487686048f45d927b8c8638ea3f

branches/logging-alpha/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

branches/logging-alpha/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)