Skip to content

Commit de940dc

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

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public abstract class Util {
5757
// resources
5858
// and delete the listed resources based on the timestamp.
5959

60-
private static final int DELETION_THRESHOLD_TIME_MINUTES = 45;
60+
private static final int DELETION_THRESHOLD_TIME_MINUTES = 20;
6161
// comma separate list of zone names
6262
private static final String TEST_ZONES_NAME = "JAVA_DOCS_COMPUTE_TEST_ZONES";
6363
private static final String DEFAULT_ZONES = "us-central1-a,us-west1-a,asia-south1-a";
@@ -238,8 +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(storagePool, prefixToDelete, zone)
242-
&& isCreatedBeforeThresholdTime(storagePool.getCreationTimestamp())) {
241+
if (isCreatedBeforeThresholdTime(storagePool.getCreationTimestamp())) {
243242
deleteStoragePool(projectId, zone, storagePool.getName());
244243
}
245244
}

compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static void setUp()
7979
+ UUID.randomUUID().toString().substring(0, 8);
8080

8181
// Cleanup existing stale resources.
82-
Util.cleanUpExistingReservations("test-", PROJECT_ID, ZONE);
82+
Util.cleanUpExistingReservations("test-reservation-" + javaVersion, PROJECT_ID, ZONE);
8383

8484
CreateInstance.createInstance(PROJECT_ID, ZONE, INSTANCE_FOR_RESERVATION);
8585
CreateReservation.createReservation(

0 commit comments

Comments
 (0)