INT-4176: Fix Gemfire tests
JIRA: https://jira.spring.io/browse/INT-4176 The `DelayerHandlerRescheduleIntegrationTests` doesn't close `context` in the end of test. That causes clashes for `beanFactoryResolver` in other tests. When those tests are fail, we come into condition when new processes can't be started/stopped because of effect of non-stopped context * Fix all the `DelayerHandlerRescheduleIntegrationTests` to stop `context` in the end of test * Remove unused files in the `gemfire/store` test package * Add current date value to the `CacheServerProcess` name to avoid clashes with other ran on the same host * Add NPE check for `region` in the `GemfireMetadataStoreTests` * Extract `@BeforeClass/@AfterClass` for the `CacheWritingMessageHandlerTests` to start only one Gemfire cache per class **Cherry-pick to 4.3.x & 4.2.x**
This commit is contained in:
committed by
Gary Russell
parent
85730bfe60
commit
9078a74a19
@@ -73,7 +73,8 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
|
||||
|
||||
// Emulate restart and check DB state before next start
|
||||
// Interrupt taskScheduler as quickly as possible
|
||||
ThreadPoolTaskScheduler taskScheduler = (ThreadPoolTaskScheduler) IntegrationContextUtils.getTaskScheduler(context);
|
||||
ThreadPoolTaskScheduler taskScheduler =
|
||||
(ThreadPoolTaskScheduler) IntegrationContextUtils.getTaskScheduler(context);
|
||||
taskScheduler.shutdown();
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10, TimeUnit.SECONDS);
|
||||
context.destroy();
|
||||
@@ -121,7 +122,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
|
||||
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
|
||||
messageStore.removeMessageGroup(delayerMessageGroupId);
|
||||
|
||||
context.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user