This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new c680356717 ARTEMIS-5173 Trying another test fix
c680356717 is described below
commit c68035671760e2af52e5098144f0f4101fff68c4
Author: Clebert Suconic <[email protected]>
AuthorDate: Thu Dec 12 17:51:15 2024 -0500
ARTEMIS-5173 Trying another test fix
---
.../artemis/core/client/impl/ClientSessionFactoryImpl.java | 7 ++++++-
.../failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java | 5 +++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index 1d45bc1080..4223e3c0b6 100644
---
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -70,6 +70,7 @@ import
org.apache.activemq.artemis.utils.ConfirmationWindowWarning;
import org.apache.activemq.artemis.utils.ExecutorFactory;
import org.apache.activemq.artemis.utils.PasswordMaskingUtil;
import org.apache.activemq.artemis.utils.UUIDGenerator;
+import org.apache.activemq.artemis.utils.actors.ArtemisExecutor;
import org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory;
import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
import org.slf4j.Logger;
@@ -117,7 +118,7 @@ public class ClientSessionFactoryImpl implements
ClientSessionFactoryInternal, C
private final ScheduledExecutorService scheduledThreadPool;
- private final Executor closeExecutor;
+ private final ArtemisExecutor closeExecutor;
private final Executor flowControlExecutor;
@@ -1566,4 +1567,8 @@ public class ClientSessionFactoryImpl implements
ClientSessionFactoryInternal, C
serverLocator.notifyNodeDown(eventTime, nodeID, disconnect);
}
}
+
+ public void flushCloseExecutor(int time, TimeUnit unit) {
+ closeExecutor.flush(time, unit);
+ }
}
diff --git
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java
index 8b2cde2b07..5603aef7e3 100644
---
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java
+++
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java
@@ -31,6 +31,7 @@ import
org.apache.activemq.artemis.api.core.client.ClientSession;
import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
import org.apache.activemq.artemis.api.core.client.FailoverEventType;
import org.apache.activemq.artemis.api.core.client.ServerLocator;
+import org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl;
import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration;
import
org.apache.activemq.artemis.core.config.ha.ReplicationBackupPolicyConfiguration;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -160,6 +161,7 @@ public class
ReplicatedMultipleServerFailoverExtraBackupsTest extends Replicated
CountDownLatch failoverHappened = new CountDownLatch(1);
session0.addFailoverListener((FailoverEventType type) -> {
+ new Exception("Type::" + type).printStackTrace();
if (type == FailoverEventType.FAILOVER_COMPLETED) {
failoverHappened.countDown();
}
@@ -173,6 +175,9 @@ public class
ReplicatedMultipleServerFailoverExtraBackupsTest extends Replicated
assertTrue(failoverHappened.await(10, TimeUnit.SECONDS));
+
((ClientSessionFactoryImpl)session0.getSessionFactory()).flushCloseExecutor(10,
TimeUnit.SECONDS);
+
((ClientSessionFactoryImpl)session1.getSessionFactory()).flushCloseExecutor(10,
TimeUnit.SECONDS);
+
ClientConsumer consumer0 = session0.createConsumer(ADDRESS);
ClientConsumer consumer1 = session1.createConsumer(ADDRESS);
session0.start();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact