Skip to content

Commit bd93052

Browse files
Changed time for cleanup methods to 24 hours
1 parent c1e28d4 commit bd93052

File tree

1 file changed

+2
-2
lines changed
  • compute/cloud-client/src/test/java/compute

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public abstract class Util {
4949
// resources
5050
// and delete the listed resources based on the timestamp.
5151

52-
private static final int DELETION_THRESHOLD_TIME_MINUTES = 30;
52+
private static final int DELETION_THRESHOLD_TIME_HOURS = 24;
5353
// comma separate list of zone names
5454
private static final String TEST_ZONES_NAME = "JAVA_DOCS_COMPUTE_TEST_ZONES";
5555
private static final String DEFAULT_ZONES = "us-central1-a,us-west1-a,asia-south1-a";
@@ -118,7 +118,7 @@ && isCreatedBeforeThresholdTime(instance.getCreationTimestamp())) {
118118

119119
public static boolean isCreatedBeforeThresholdTime(String timestamp) {
120120
return OffsetDateTime.parse(timestamp).toInstant()
121-
.isBefore(Instant.now().minus(DELETION_THRESHOLD_TIME_MINUTES, ChronoUnit.MINUTES));
121+
.isBefore(Instant.now().minus(DELETION_THRESHOLD_TIME_HOURS, ChronoUnit.HOURS));
122122
}
123123

124124
public static String getBase64EncodedKey() {

0 commit comments

Comments
 (0)