diff --git a/spring-geode-tests/smoke-tests/locator-application/spring-geode-smoke-tests-locator-application.gradle b/spring-geode-tests/smoke-tests/locator-application/spring-geode-smoke-tests-locator-application.gradle index 97e57755..afbc0832 100644 --- a/spring-geode-tests/smoke-tests/locator-application/spring-geode-smoke-tests-locator-application.gradle +++ b/spring-geode-tests/smoke-tests/locator-application/spring-geode-smoke-tests-locator-application.gradle @@ -7,7 +7,7 @@ dependencies { implementation "org.assertj:assertj-core" implementation project(':spring-geode-starter') - // implementation project(':spring-geode-starter-logging') + //implementation project(':spring-geode-starter-logging') testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' diff --git a/spring-geode-tests/smoke-tests/locator-application/src/test/java/example/app/geode/locator/SpringBootApacheGeodeLocatorApplicationSmokeTests.java b/spring-geode-tests/smoke-tests/locator-application/src/test/java/example/app/geode/locator/SpringBootApacheGeodeLocatorApplicationSmokeTests.java index 864e419f..49baa0c5 100644 --- a/spring-geode-tests/smoke-tests/locator-application/src/test/java/example/app/geode/locator/SpringBootApacheGeodeLocatorApplicationSmokeTests.java +++ b/spring-geode-tests/smoke-tests/locator-application/src/test/java/example/app/geode/locator/SpringBootApacheGeodeLocatorApplicationSmokeTests.java @@ -18,7 +18,6 @@ package example.app.geode.locator; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; -import java.util.concurrent.TimeUnit; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -70,18 +69,14 @@ public class SpringBootApacheGeodeLocatorApplicationSmokeTests extends ForkingCl int locatorPort = findAvailablePort(); - long waitTimeout = TimeUnit.SECONDS.toMillis(10); - startGemFireServer(ApacheGeodeLocator.class, String.valueOf(locatorPort)); - waitForServerToStart(ApacheGeodeLocator.HOSTNAME_FOR_CLIENTS, locatorPort, waitTimeout); System.setProperty(SPRING_DATA_GEMFIRE_LOCATORS_PROPERTY, String.format("%1$s[%2$d]", ApacheGeodeLocator.HOSTNAME_FOR_CLIENTS, locatorPort)); } @AfterClass - public static void stopGeodeLocator() { - stopGemFireServer(); + public static void afterGeodeLocatorStop() { System.clearProperty(SPRING_DATA_GEMFIRE_LOCATORS_PROPERTY); } diff --git a/spring-geode-tests/smoke-tests/locator-application/src/test/resources/test.properties b/spring-geode-tests/smoke-tests/locator-application/src/test/resources/test.properties new file mode 100644 index 00000000..3a62744a --- /dev/null +++ b/spring-geode-tests/smoke-tests/locator-application/src/test/resources/test.properties @@ -0,0 +1,20 @@ +# Test Properties used to configure Spring Boot and Apache Geode during test execution. + +# Setting the following Apache Geode "internal" System property ("gemfire.Buffer.useHeapBuffers") because Apache Geode +# is not fully Java 17 compatible and leads to the following error: +# Caused by: java.lang.reflect.InaccessibleObjectException: +# Unable to make public java.lang.Object java.nio.DirectByteBuffer.attachment() accessible: +# module java.base does not "opens java.nio" to unnamed module @2e0fa5d3 +# at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) +# at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) +# at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) +# at java.base/java.lang.reflect.Method.setAccessible(Method.java:193) +# at org.apache.geode.internal.net.BufferPool.getPoolableBuffer(BufferPool.java:343) +# ... 69 more + +# The gemfire.BufferPool.useHeapBuffers property should technically be true, but due to an Apache Geode bug, +# it is ignore entirely due to the first condition (#sigh); see https://issues.apache.org/jira/browse/GEODE-10035. +#system.gemfire.BufferPool.useHeapBuffers=true + +# Use this (GemFire) System property instead (effects the "first condition"). +system.p2p.nodirectBuffers=true