Skip to content

Commit ca60b73

Browse files
Fixed claenup method for Hyperdisk
1 parent 5418216 commit ca60b73

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

compute/cloud-client/src/test/java/compute/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public static void cleanUpExistingStoragePool(
238238
throws IOException, ExecutionException, InterruptedException, TimeoutException {
239239
try (StoragePoolsClient storagePoolsClient = StoragePoolsClient.create()) {
240240
for (StoragePool storagePool : storagePoolsClient.list(projectId, zone).iterateAll()) {
241-
if (containPrefixToDeleteAndZone(projectId, prefixToDelete, zone)
241+
if (containPrefixToDeleteAndZone(storagePool, prefixToDelete, zone)
242242
&& isCreatedBeforeThresholdTime(storagePool.getCreationTimestamp())) {
243243
deleteStoragePool(projectId, zone, storagePool.getName());
244244
}

compute/cloud-client/src/test/java/compute/disks/HyperdisksIT.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ public static void setUp()
6464
STORAGE_POOL_NAME = "test-storage-pool-enc-" + UUID.randomUUID();
6565

6666
Util.cleanUpExistingDisks("test-hyperdisk-enc-", PROJECT_ID, ZONE);
67-
Util.cleanUpExistingStoragePool("test-", PROJECT_ID, ZONE);
68-
Util.cleanUpExistingStoragePool("test-", PROJECT_ID, "us-central1-a");
69-
Util.cleanUpExistingStoragePool("test-", PROJECT_ID, "asia-south1-a");
70-
Util.cleanUpExistingStoragePool("test-", PROJECT_ID, "us-west1-a");
71-
67+
Util.cleanUpExistingStoragePool("test-storage-pool-enc-", PROJECT_ID, ZONE);
7268
}
7369

7470
@AfterAll

0 commit comments

Comments
 (0)