You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@artemis.apache.org by cl...@apache.org on 2026/08/24 18:41:36 UTC

(artemis) branch main updated: ARTEMIS-6207 fix race condition in test

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/artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fa109e6ae ARTEMIS-6207 fix race condition in test
6fa109e6ae is described below

commit 6fa109e6ae7a353809768b1fdc0b6f62f6f2fe01
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Mon Aug 24 08:09:02 2026 -0500

    ARTEMIS-6207 fix race condition in test
    
    All the tests in o.a.a.a.c.c.i.ActiveMQServerStartupTest have a race
    condition where o.a.a.a.c.s.i.ActiveMQServerImpl#getCriticalAnalyzer
    becomes non-null before any actions are added so that when
    o.a.a.a.u.c.CriticalAnalyzerAccessor#fireActions is called on the next
    line it might not actually do anything.
    
    The fix is to wait until actions are added before assigning
    o.a.a.a.c.s.i.ActiveMQServerImpl#analyzer a value.
---
 .../apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 31719a0f3f..b301395668 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -890,8 +890,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          } else {
             analyzer = EmptyCriticalAnalyzer.getInstance();
          }
-
-         this.analyzer = analyzer;
       }
 
       /*
@@ -957,6 +955,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
       };
 
       analyzer.addAction(criticalAction);
+      this.analyzer = analyzer;
    }
 
    private static void checkCriticalAnalyzerLogging() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@artemis.apache.org
For additional commands, e-mail: commits-help@artemis.apache.org