This is an automated email from the ASF dual-hosted git repository. apupier pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5f30ac0a9f3d3965fe0037b4fcc929ab60c73a6b Author: Aurélien Pupier <[email protected]> AuthorDate: Fri Nov 6 10:17:06 2026 +0100 CAMEL-26631: camel-test-infra-artemis - Make embeddedBrokerService volatile The field is no longer final and is reassigned in the synchronized initialize(), while it is read without synchronization in shutdown(), getEmbeddedBrokerService(), countMessages() and getQueueQueryResult(). Declaring it volatile guarantees that those readers see the latest reference. Addresses the review feedback on the PR. Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <[email protected]> --- .../test/infra/artemis/services/AbstractArtemisEmbeddedService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-infra/camel-test-infra-artemis/src/main/java/org/apache/camel/test/infra/artemis/services/AbstractArtemisEmbeddedService.java b/test-infra/camel-test-infra-artemis/src/main/java/org/apache/camel/test/infra/artemis/services/AbstractArtemisEmbeddedService.java index e545dc861786..786397133b3c 100644 --- a/test-infra/camel-test-infra-artemis/src/main/java/org/apache/camel/test/infra/artemis/services/AbstractArtemisEmbeddedService.java +++ b/test-infra/camel-test-infra-artemis/src/main/java/org/apache/camel/test/infra/artemis/services/AbstractArtemisEmbeddedService.java @@ -45,7 +45,7 @@ public abstract class AbstractArtemisEmbeddedService implements ArtemisInfraServ protected static final Logger LOG = LoggerFactory.getLogger(AbstractArtemisEmbeddedService.class); private static final AtomicInteger BROKER_COUNT = new AtomicInteger(); - protected EmbeddedActiveMQ embeddedBrokerService; + protected volatile EmbeddedActiveMQ embeddedBrokerService; private Configuration artemisConfiguration; private Consumer<Configuration> customConfigurator; private final int port;
