Commit Graph

328 Commits

Author SHA1 Message Date
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
John Blum
67b8b03f33 Edit Javadoc description of the META-INF/spring.factories configuration file. 2021-10-26 21:21:03 -07:00
John Blum
3fa2da7203 Replace STDG's JavaVersion class with SDG's JavaVersion class. 2021-09-27 14:26:41 -07:00
John Blum
d89a71c3a0 Prepare next development iteration.
Set version to 0.0.27-SNAPSHOT.
2021-09-27 14:18:18 -07:00
John Blum
3261408b26 Release 0.0.26. 2021-09-27 14:11:30 -07:00
John Blum
d23c4933b6 Copy SDG's JavaVersion class to STDG.
STDG's JavaVersion clone will be replaced by SDG's JavaVersion class once STDG is based on SDG 2.5.6.
2021-09-27 14:02:13 -07:00
John Blum
ff597803c1 Add Javadoc to the ProcessExecutor.launch(..) methods. 2021-09-27 13:46:35 -07:00
John Blum
dc444686de Switch the RegionDataInitializingPostProcessor from a Spring BeanPostProcess to a Spring @Component @EventListener. 2021-09-24 18:00:59 -07:00
John Blum
fcf1842e02 Add Spring BeanPostProcessor to initialize an Apache Geode Region (bean) with data on Spring container initialization. 2021-09-24 16:45:07 -07:00
John Blum
0978f22061 Set JRE version check to Java 16 when adding additional JVM options. 2021-09-20 17:00:03 -07:00
John Blum
49df59f159 Add JRE version specific JVM options to reliably run (fork) GemFire/Geode servers. 2021-09-20 16:27:43 -07:00
John Blum
fcafd5ca46 Add additional overloaded closeGemFireCacheWaitOnCacheClosedEvent(..) methods to control how the GemFireCache object (instance) is closed using a java.util.function.Function. 2021-09-20 11:55:45 -07:00
John Blum
fef16bf957 Add overloaded closeGemFireCacheWaitOnCacheClosedEvent(..) methods accepting a Supplier for a GemFireCache object to close. 2021-09-20 11:55:23 -07:00
John Blum
84442946bd Unregister all Functions from Apache Geode's FunctionService after test class/suite execution. 2021-09-16 22:57:04 -07:00
John Blum
61316b8631 Change all JUnit declared @BeforeClass Spring and Apache Geode object and resource cleanup to occur after test (class/suite) execution using JUnit's @AfterClass.
Edit Javadoc.
2021-09-16 22:56:50 -07:00
John Blum
e188e9f48e Add test class cleanup method to delete all Apache Geode/VMware GemFire process .pid files. 2021-09-15 18:16:18 -07:00
John Blum
5cef6cdbd6 Rename closeAnyGemFireCacheInstanceBeforeTestExecution() method to claseAnyGemFireCacheBeforeTestExecution(). 2021-09-15 18:15:20 -07:00
John Blum
3efceeb494 Add overloaded newApplicationContext(..) method to accept a Function to further initialize and process the new ApplicationContext created in the SpringApplicationContextIntegrationTestsSupport class. 2021-09-14 23:37:12 -07:00
John Blum
f24c1a7690 Add containsBean(:String) method to the SpringApplicationContextIntegrationTestsSupport class. 2021-09-14 23:32:33 -07:00
John Blum
876ad6ec52 Add getBeansOfType(Class<T>) method to the SpringApplicationContextIntegrationTestsSupport class. 2021-09-14 23:32:01 -07:00
John Blum
666555a220 Suppress (unchecked) compiler warning in GemFireMockObjectsSupport. 2021-09-14 11:55:36 -07:00
John Blum
770b3c85cf Add getters and setter for the autowiored/injected Spring ConfigurableApplicationContext object reference in IntegrationTestsSupport. 2021-09-14 11:52:14 -07:00
John Blum
b1de07519b Add capability to unregister all Functions registered with the FunctionService on destruction of the GemFire Mock Objects. 2021-09-14 11:00:32 -07:00
John Blum
87a7bc8e49 Fix bug with DistributedSystem Properties handling in mock object configuration. 2021-09-13 14:39:48 -07:00
John Blum
a6fa87638e Refer to Apache Geode properties by name using DistributionConfig constants. 2021-09-13 13:22:56 -07:00
John Blum
933721a969 Mock the Pool.getQueryService() method. 2021-09-13 12:09:01 -07:00
John Blum
227f96e900 Add capability to remember (refer to) and resolve a reference to any (latest) GemFireCache object created by the Apache Geode mock objects test framework. 2021-09-13 12:07:33 -07:00
John Blum
ee16dd37ad Add mock support for CacheServer groups configuration. 2021-09-10 17:41:01 -07:00
John Blum
20e401e94f Fix bugs in mock Index logic regarding (mock) Region references. 2021-09-10 17:26:14 -07:00
John Blum
70cf67cf45 Fix bugs in mock Lucene objects functionality. 2021-09-10 16:51:28 -07:00
John Blum
598a520dbe Refactor mockLuceneIndexFactory(..) method logic. 2021-09-10 16:16:08 -07:00
John Blum
5b78c3d856 Format source code. 2021-09-10 15:12:07 -07:00
John Blum
e398b8a23b Add mock support for MembershipAttributes configuration on RegionAttributes for a Region. 2021-09-10 15:08:17 -07:00
John Blum
fc98bd0fd4 Add mock support for the Apache Geode CacheTransactionManager API. 2021-09-10 11:17:48 -07:00
John Blum
8f31eb4f1b Add overloaded signal(..) method to accept an arbitrary Object value to send to the server. 2021-09-10 10:44:19 -07:00
John Blum
bc1fcd6cd1 Add startGeodeServer(..) alias method for the startGemFireServer(..) method in the ForkingClientServerIntegrationTestsSupport class. 2021-09-09 11:17:10 -07:00
John Blum
a39f40841d Refresh the Spring ApplicationContext in the runSpringApplication(..) method of the ClientServerIntegrationTestsSupport class. 2021-09-09 11:13:02 -07:00
John Blum
2ff96e5c6f Add static block() method in ClientServerIntegrationTestsSupport to prevent forked, non-daemon JVM processes used in testing from prematurely terminating. 2021-09-09 11:05:04 -07:00
John Blum
9dcd1ed8ea Change mock GatewayReceiver.getPort() to generate a random port between start and end ports. 2021-09-09 10:43:30 -07:00
John Blum
74da92a993 Change mock GatewayReceiver 'running' property to be the negation of 'manualStart'. 2021-09-09 10:38:36 -07:00