Improve Hazelcast test suite performance

* Add recommended JVM args to the Gradle module for HZ performance
* Move `IdempotentReceiverIntegrationTests` from JMX module to HZ for consistency
* Remove component scan from the `HazelcastIntegrationOutboundTestConfiguration` - redundant
* Use `HazelcastInstance.shutdown()` during normal context lifecycle.
The `@AfterClass` may happen early, so the `stop()` of the channel adapters may fail with
an exception that HZ is not available causing the `LifecycleProcessor` to wait for 30 seconds
on the lifecycle barrier
* Wrap `AbstractEndpoint.doStop()` call into `try..catch` to log error instead of re-throwing
to avoid the mentioned above 30 secs delay of the application context stop
This commit is contained in:
Artem Bilan
2022-05-25 16:45:00 -04:00
parent a322f5c35d
commit 751d8084b4
19 changed files with 64 additions and 154 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -204,7 +204,12 @@ public abstract class AbstractEndpoint extends IntegrationObjectSupport
* @param callback the Runnable to invoke.
*/
protected void doStop(Runnable callback) {
doStop();
try {
doStop();
}
catch (Exception ex) {
logger.error(ex, "Error during stopping: " + this);
}
callback.run();
}