John Blum
cc18aa1949
Refactor IntegrationTestsSupportUnitTests.asDirectoryNameIsCorrect() test case method to be more resilient to temporal-based test failures.
...
Previously, the test case method could fail based on a race condition involving a timestamp in the (test) working directory name.
2022-10-17 12:43:11 -07:00
John Blum
10a84f1ef8
Edit Javadoc in IntegrationTestsSupport.
...
Replace use of Java's @NotNull annotation with Spring's @NonNull annotation.
2022-10-17 12:21:20 -07:00
John Blum
819dc70acb
Refactor ProcessWrapper to conditionally, based on System property, to forcibly destroy a forked JVM (child) process on shutdown.
2022-10-17 12:15:06 -07:00
John Blum
c9cb51b52f
Refactor IntegrationTestsSupport.asDirectoryName(:Class) logic into descriptive methods.
...
Adds the asTimestampedDirectoryName(:Class) and asUniqueDirectoryName(:Class) methods to uniquely and temporally identify a forked JVM (child) process (test) working directory.
2022-10-17 12:05:49 -07:00
John Blum
0905fd091d
Refactor the conditonal logic used to decide whether to remove the (test) working directory of a forked Process in ForkingClientServerIntegrationTests.
...
Edit Javadoc.
2022-10-17 10:22:32 -07:00
John Blum
2622b84bb3
Refactor the ProcessWrapper.shutdown() method.
...
* Removes the use of the now deprecated signalStop() method.
* Changes safeGetPid() to handle all Throwable objects.
* Changes shutdown() to call stop() and then forcibly destroy the child Process if the child Process is still running.
* Annotates the API with Spring's @NonNull and @Nullable annotations.
* Edits Javadoc.
2022-10-17 10:22:27 -07:00
John Blum
9388d9d829
Refactor ProcessWrapper.safeGetPid() to ignore all Throwable objects.
2022-10-17 10:22:19 -07:00
John Blum
d52c7e1428
Fix OS/JVM platform issues with IntegrationTestsSupportUnitTests.
2022-10-13 16:58:21 -07:00
John Blum
d836205d5e
Replace Java @NotNull annotation with the Spring @NonNull annotation.
2022-10-13 16:57:46 -07:00
John Blum
218aec18ea
Conditionally (and recursively) remove the test directory of the forked GemFire/Geode server process.
2022-10-13 16:15:20 -07:00
John Blum
1617173c44
Refactor asDirectoryName(:Class<?>) to qualify type based on declaring types and include a UUID in the pathname.
2022-10-13 15:50:14 -07:00
John Blum
b3675d9d00
Add utility method supporting the (recursive) removal of a (test) directory in IntegrationTestsSupport.
2022-10-13 15:16:25 -07:00
John Blum
c829d1c2a7
Declare 'org.jgroups' Logger configuration in JUL, Log4j and Logback properties/XML configuration files.
2022-10-13 15:11:55 -07:00
John Blum
30ddd504eb
Format src/test/resources/logback.xml configuration file.
2022-10-13 15:09:47 -07:00
John Blum
4690ca76e1
Edit Javadoc in the GemFireMockObjectsBeanPostProcessor class.
2022-10-13 15:08:08 -07:00
John Blum
3d259e477f
Refactor the GemFireMockObjectsConfiguration class.
2022-10-13 15:07:44 -07:00
John Blum
db9309be73
Annotate the initialize(:ConfigurableApplicationContext) method parameter with Spring's @NonNull annotation.
2022-10-13 15:04:14 -07:00
John Blum
b1918760b2
Include reference to the Apache Geode commit that changed the API and broke STDG!
2022-07-15 03:19:15 -07:00
John Blum
2765380924
Disable Apache Geode SslConfigurationIntegrationTests.
2022-07-15 02:33:10 -07:00
John Blum
315c300933
Replace use of Apache Shiro StringUtils with Spring Framework StringUtils.
2022-06-09 12:40:22 -07:00
John Blum
28080cc80f
Refactor JVM/JRE runtime options required by Apache Geode to run on Java 17.
2022-06-09 12:13:49 -07:00
John Blum
c0cd73dc1e
Adapt to API changes in Spring Data for Apache Geode (SDG) 3.0.
2022-05-16 14:30:55 -07:00
John Blum
28e9d880b2
Update Copyright to 2022.
2022-03-17 17:13:46 -07:00
John Blum
58115c2168
Add static destroy() method to destroy the Singleton TestProperties instance.
2022-01-31 12:09:37 -08:00
John Blum
a62f12d909
Refactore IntegrationTestsSupport to configure (load) and clear TestProperties before and after test execution.
2022-01-31 10:32:51 -08:00
John Blum
3d1948a041
Create the o.s.d.gemfire.tests.config.TestProperties class.
...
TestProperties allows a test class to load and use properties (e.g. from a test.properties classpath resource) specific to the test during test execution.
2022-01-31 10:22:58 -08:00
John Blum
f5af5ba434
Create a o.s.d.gemfire.tests.config.TestConfigurationException, RuntimeException class.
...
The TestConfigurationException indicates a problem with the test configuration.
2022-01-30 22:49:10 -08:00
John Blum
4b77c5621c
Create a o.s.d.gemfire.tests.TestException, RuntimeException class.
...
The TestException indicates a problem during testing.
2022-01-30 22:48:26 -08:00
John Blum
cd824c7ced
Replace all Java EE javax.* package imports with Jakarta EE 9 package imports.
...
Replace javax.annotation package import with the jakarta.annotation package.
2021-12-13 18:59:45 -08:00
John Blum
2b48f3817c
Format source code in the GemFireMockObjectsSupport class.
2021-12-13 18:54:08 -08:00
John Blum
e40cc6548f
Fix Javadoc in the DependencyOf annotation.
2021-12-13 18:53:11 -08:00
John Blum
bd087e05fc
Add overloaded launch(..) method to ProcessExecutor accepting a Java CLASSPATH, Class type with the main method to run and an array of String arguments passed to the forked Java program.
2021-10-28 16:39:06 -07:00
John Blum
92b26c0d50
Refactor the ProcessExecutor.launch(..) method to register a JRE shutdown hook on the ProcessWrapper representing the forked [Java / JVM] process.
...
Resolves gh-15.
2021-10-28 15:35:18 -07:00
John Blum
1ef42b374a
Return the ProcessWrapper (this) from the ProcessWrapper.registerShutdownHook() method.
2021-10-28 15:32:13 -07:00
John Blum
b5be8da185
Add overloaded startGemFireServer(..) and startGeodeServer(..) methods to the ForkingClientServerIntegrationTestsSupport class to control the working directory and classpath of the forked Java/JVM processes.
...
Resolves gh-17.
2021-10-28 15:03:12 -07:00
John Blum
900b1aff4d
Create a Java FunctionalInterface and extension of the ProcessRunner interface defining a contract, logic and strategy for running (executing) a Java/JVM Process.
...
Resolves gh-17.
2021-10-28 15:03:12 -07:00
John Blum
14ac8cc780
Create a Java FunctionalInterface defining a contract, logic and strategy for running (executing) an Operating System (OS) Process.
...
Resolves gh-17.
2021-10-28 15:02:51 -07:00
John Blum
81589fab22
Set the host & port on the ProcessWrapper representing the GemFire/Geode JVM server process forked by the STDG framework.
...
Return the ProcessWrapper representing the forked GemFire/Geode JVM server process from the startGemFireServer(..) and startGeodeServer(..) methods.
Resolves gh-14.
2021-10-28 14:10:11 -07:00
John Blum
d9bfbd479d
Add configurable 'host' and 'port' properties to the ProcessWrapper class.
...
The 'host' property represents the system (computer in the network) that is running the Process.
The 'port' property represents the host system port on wich the Process is listening for client connections.
Resolves gh-14.
2021-10-28 14:09:11 -07:00
John Blum
7602f7d704
Increase the 'order' precedence of the CloseApplicationContextAfterTestClassTestExecutionListener to occur after all Spring TestContext framework provided TestExecutionListeners.
2021-10-28 11:06:29 -07:00
John Blum
d971817a7e
Add logic to the ConfigurableCacheAwareContextLoaderDelegate to guard against inactive ApplicationContexts.
...
Edit Javadoc.
2021-10-28 11:06:25 -07:00
John Blum
2ae2f84779
Add utility function in SpringUtils to determine the 'active' state of the given ApplicationContext.
2021-10-28 11:06:12 -07:00
John Blum
96e864c319
Refactor CloseApplicationContextAfterTestClassTestExecutionListener to extend AbstractTestExecutionListener and override the getOrder() method.
2021-10-28 10:12:49 -07:00
John Blum
7573c08af2
Add Spring TestExecutionListener to close the ApplicationContext associated with the Spring TestContext for the currently executing test class after test class execution.
2021-10-27 17:17:55 -07:00
John Blum
eb9f44606e
Rename GeodeContextCustomizer and GeodeContextCustomizerFactory classes to DependencyOfAnnotationContextCustomizer and DependencyOfAnnotationContextCustomizerFactory, respectively.
...
Move classes to the org.springframework.data.gemfire.tests.extensions.sppring.test.context package.
2021-10-27 17:17:48 -07:00
John Blum
675456ea8b
Refactor the ConfigurableCacheAwareContextLoaderDelegate class to remember and reference the current ApplicationContext in use by the Spring TestContext framework and currently executing test class.
...
This is necessary in order to properly close the ApplicationContext and release all Spring bean resources after use (e.g. after the test class executes).
2021-10-27 17:17:14 -07:00
John Blum
6fab602cdf
Refactor the STDG SpringUtils class to extend the SDG SpringUtils class.
...
Add and edit Javadoc.
2021-10-27 15:27:33 -07:00
John Blum
050d1167d2
Add abstract utility class for working with Spring Framework objects and components (beans).
2021-10-27 15:24:09 -07:00
John Blum
85e280c3be
Fix logic in isSpringTestContextCacheEnabled() method.
2021-10-27 11:01:14 -07:00
John Blum
4016e3c5a1
Add custom implementation of the Spring TestContext framework CacheAwareContextLoaderDelegate interface to enable/disable caching of the Spring TestContext using SpringProperties and Java System properties.
2021-10-26 21:22:12 -07:00