This repository was archived by the owner on Feb 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/com/google/cloud/logging/testing
test/java/com/google/cloud/logging Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public static RemoteLoggingHelper create() {
101101 * <p>Format: {Instant}_{name}_{UUID}
102102 */
103103 public static String formatForTest (String name ) {
104- String now = DateTimeFormatter .ISO_INSTANT .format (Instant .now ());
104+ String now = DateTimeFormatter .ISO_LOCAL_DATE .format (Instant .now ());
105105 return now + "_" + name + "_" + UUID .randomUUID ().toString ().substring (0 , 8 );
106106 }
107107
Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ static void beforeClass() {
5050
5151 @ AfterAll
5252 static void afterClass () throws Exception {
53- // Use a cutoff of ~6 hours based on the log name. Any logs that were created before the cutoff
53+ // Use a cutoff of a day based on the log name. Any logs that were created before the cutoff
5454 // is from a previous invocation of the test and was unable to be properly deleted.
5555 Page <String > logPage = logging .listLogs ();
5656 for (String logName : logPage .iterateAll ()) {
57- Instant cutoff = Instant .now ().minus (6 , ChronoUnit .HOURS );
57+ Instant cutoff = Instant .now ().minus (1 , ChronoUnit .DAYS );
5858 String logCreateTimeString = logName .split ("_" )[0 ];
5959 Instant logCreateTimeInstant =
60- (Instant ) DateTimeFormatter .ISO_INSTANT .parse (logCreateTimeString );
60+ (Instant ) DateTimeFormatter .ISO_LOCAL_DATE .parse (logCreateTimeString );
6161 if (logCreateTimeInstant .isBefore (cutoff )) {
6262 logging .deleteLog (logName );
6363 }
You can’t perform that action at this time.
0 commit comments