From d52c7e142831d40b322a6faba9d98ded812268df Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 13 Oct 2022 16:58:21 -0700 Subject: [PATCH] Fix OS/JVM platform issues with IntegrationTestsSupportUnitTests. --- .../tests/integration/IntegrationTestsSupportUnitTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-data-geode-test/src/test/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupportUnitTests.java b/spring-data-geode-test/src/test/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupportUnitTests.java index 12e86c2..5c53129 100644 --- a/spring-data-geode-test/src/test/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupportUnitTests.java +++ b/spring-data-geode-test/src/test/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupportUnitTests.java @@ -19,6 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat; import java.io.File; import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import org.junit.Test; @@ -40,9 +41,9 @@ public class IntegrationTestsSupportUnitTests { String directoryName = IntegrationTestsSupport.asDirectoryName(OuterType.InnerType.class); assertThat(directoryName).isNotBlank(); - assertThat(directoryName).startsWith(String.format("%s.%s.%s-%d-%d-%d-%d-%d-%d%s", + assertThat(directoryName).startsWith(String.format("%s.%s.%s-%s%s", IntegrationTestsSupportUnitTests.class.getSimpleName(), OuterType.class.getSimpleName(), OuterType.InnerType.class.getSimpleName(), - now.getYear(), now.getMonthValue(), now.getDayOfMonth(), now.getHour(), now.getMinute(), now.getSecond(), + DateTimeFormatter.ofPattern(IntegrationTestsSupport.DATE_TIME_PATTERN).format(now), File.separator)); }