mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2026-09-16 18:13:17 +00:00
[ACS-10783] && [ACS-10784] Upgrade ActiveMQ Server to 6.2.0 and create backward compatibility tests with ActiveMQ 5.X server (#3752)
This commit is contained in:
@@ -251,7 +251,7 @@ jobs:
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dmessaging.broker.username=admin -Dmessaging.broker.password=admin # pragma: allowlist secret
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
@@ -431,13 +431,17 @@ jobs:
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
repository_messaging_tests:
|
||||
name: Repository - Messaging tests
|
||||
name: Repository - Messaging tests against ${{ matrix.activemq }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
activemq: [ 'activemq6', 'activemq5' ]
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v12.4.3
|
||||
@@ -448,9 +452,9 @@ jobs:
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run ActiveMQ"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.activemq }} up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false # pragma: allowlist secret
|
||||
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false -Dmessaging.broker.username=admin -Dmessaging.broker.password=admin # pragma: allowlist secret
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
@@ -524,7 +528,7 @@ jobs:
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.mvn-options }} # pragma: allowlist secret
|
||||
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dmessaging.broker.username=admin -Dmessaging.broker.password=admin ${{ matrix.mvn-options }} # pragma: allowlist secret
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
|
||||
+5
-5
@@ -358,7 +358,7 @@
|
||||
"filename": "packaging/tests/environment/docker-compose-minimal+transforms.yml",
|
||||
"hashed_secret": "d1ebbc78705ad98aa2c8fb357d2e30c8f001673a",
|
||||
"is_verified": false,
|
||||
"line_number": 76
|
||||
"line_number": 78
|
||||
}
|
||||
],
|
||||
"packaging/tests/environment/docker-compose-minimal.yml": [
|
||||
@@ -381,7 +381,7 @@
|
||||
"filename": "packaging/tests/environment/docker-compose-minimal.yml",
|
||||
"hashed_secret": "d1ebbc78705ad98aa2c8fb357d2e30c8f001673a",
|
||||
"is_verified": false,
|
||||
"line_number": 79
|
||||
"line_number": 81
|
||||
}
|
||||
],
|
||||
"packaging/tests/scripts/wait-for-alfresco-start.sh": [
|
||||
@@ -1832,7 +1832,7 @@
|
||||
"filename": "scripts/ci/docker-compose/docker-compose.yaml",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 39,
|
||||
"line_number": 48,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1840,10 +1840,10 @@
|
||||
"filename": "scripts/ci/docker-compose/docker-compose.yaml",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 43,
|
||||
"line_number": 52,
|
||||
"is_secret": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"generated_at": "2025-12-30T10:31:21Z"
|
||||
"generated_at": "2026-01-30T13:46:48Z"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.16
|
||||
POSTGRES_TAG=16.6
|
||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||
ACTIVEMQ_TAG=6.2.0-jre17-rockylinux8
|
||||
|
||||
@@ -92,5 +92,7 @@ services:
|
||||
image: alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
||||
environment:
|
||||
JAVA_OPTS: " -Xms256m -Xmx512m"
|
||||
SPRING_ACTIVEMQ_USER: admin
|
||||
SPRING_ACTIVEMQ_PASSWORD: admin #pragma: allowlist secret
|
||||
ports:
|
||||
- 8090:8090
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
</run>
|
||||
</image>
|
||||
<image>
|
||||
<name>alfresco/alfresco-activemq:5.18.3-jre17-rockylinux8</name>
|
||||
<name>alfresco/alfresco-activemq:6.2-jre17-rockylinux8</name>
|
||||
<run>
|
||||
<ports>
|
||||
<port>${activemq.port1}:${activemq.port1}</port>
|
||||
@@ -513,7 +513,7 @@
|
||||
</run>
|
||||
</image>
|
||||
<image>
|
||||
<name>alfresco/alfresco-activemq:5.18.3-jre17-rockylinux8</name>
|
||||
<name>alfresco/alfresco-activemq:6.2-jre17-rockylinux8</name>
|
||||
<run>
|
||||
<ports>
|
||||
<port>${activemq.port1}:${activemq.port1}</port>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.16
|
||||
POSTGRES_TAG=16.6
|
||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||
ACTIVEMQ_TAG=6.2.0-jre17-rockylinux8
|
||||
|
||||
@@ -40,6 +40,8 @@ services:
|
||||
-Dshare.host=localhost
|
||||
-Daos.baseUrlOverwrite=http://localhost:8082/alfresco/aos
|
||||
-Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\"
|
||||
-Dmessaging.broker.username=admin
|
||||
-Dmessaging.broker.password=admin
|
||||
-DlocalTransform.core-aio.url=http://transform-core-aio:8090/
|
||||
-Dimap.server.port=1143
|
||||
-Dftp.port=1221
|
||||
|
||||
@@ -40,6 +40,8 @@ services:
|
||||
-Dshare.host=localhost
|
||||
-Daos.baseUrlOverwrite=http://localhost:8082/alfresco/aos
|
||||
-Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\"
|
||||
-Dmessaging.broker.username=admin
|
||||
-Dmessaging.broker.password=admin
|
||||
-Dlocal.transform.service.enabled=false
|
||||
-Dlegacy.transform.service.enabled=false
|
||||
-Dimap.server.port=1143
|
||||
@@ -89,4 +91,4 @@ services:
|
||||
- 8161:8161 # Web Console
|
||||
- 5672:5672 # AMQP
|
||||
- 61616:61616 # OpenWire
|
||||
- 61613:61613 # STOMP
|
||||
- 61613:61613 # STOMP
|
||||
|
||||
@@ -817,7 +817,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-activemq</artifactId>
|
||||
<artifactId>camel-activemq6</artifactId>
|
||||
<version>${dependency.camel.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
opencmis.tck.readtimeout=10000
|
||||
opencmis.tck.connecttimeout=10000
|
||||
|
||||
system.workflow.engine.activiti.taskvariableslimit=200
|
||||
system.workflow.engine.activiti.taskvariableslimit=200
|
||||
|
||||
+1
-1
@@ -564,7 +564,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-activemq</artifactId>
|
||||
<artifactId>camel-activemq6</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
<property name="configuration" ref="jmsConfig"/>
|
||||
</bean>
|
||||
|
||||
<bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent">
|
||||
<bean id="activemq" class="org.apache.camel.component.activemq6.ActiveMQComponent">
|
||||
<property name="configuration" ref="jmsConfig"/>
|
||||
</bean>
|
||||
|
||||
|
||||
+9
-3
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2026 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -51,6 +51,7 @@ import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
@@ -96,6 +97,11 @@ public abstract class AbstractContextAwareRepoEvent extends BaseSpringTest
|
||||
protected final Locale frenchLocale = new Locale(Locale.FRENCH.getLanguage());
|
||||
protected final Locale japaneseLocale = new Locale(Locale.JAPANESE.getLanguage(), "YY", "ZZ");
|
||||
|
||||
@Value("${messaging.broker.password}")
|
||||
private String acqPassword;
|
||||
@Value("${messaging.broker.username}")
|
||||
private String acqUsername;
|
||||
|
||||
private static boolean isCamelConfigured;
|
||||
private static DataFormat dataFormat;
|
||||
|
||||
@@ -180,7 +186,7 @@ public abstract class AbstractContextAwareRepoEvent extends BaseSpringTest
|
||||
int count = maxloops;
|
||||
do
|
||||
{
|
||||
Thread.sleep(165l);
|
||||
Thread.sleep(165L);
|
||||
if (EVENT_CONTAINER.isEmpty())
|
||||
{
|
||||
count--;
|
||||
@@ -436,7 +442,7 @@ public abstract class AbstractContextAwareRepoEvent extends BaseSpringTest
|
||||
|
||||
private void configRoute() throws Exception
|
||||
{
|
||||
final ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL);
|
||||
final ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(acqUsername, acqPassword, BROKER_URL);
|
||||
CAMEL_CONTEXT.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
|
||||
|
||||
CAMEL_CONTEXT.addRoutes(new RouteBuilder() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2026 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -47,6 +47,7 @@ import org.awaitility.Awaitility;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.event.v1.model.RepoEvent;
|
||||
@@ -57,14 +58,19 @@ public abstract class EventGeneratorTest extends AbstractContextAwareRepoEvent
|
||||
private static final String EVENT2_TOPIC_NAME = "alfresco.repo.event2";
|
||||
private static final long DUMP_BROKER_TIMEOUT = 50000000L;
|
||||
|
||||
@Value("${messaging.broker.password}")
|
||||
private String acqPassword;
|
||||
@Value("${messaging.broker.username}")
|
||||
private String acqUsername;
|
||||
|
||||
private ActiveMQConnection connection;
|
||||
protected List<RepoEvent<?>> receivedEvents;
|
||||
|
||||
@Before
|
||||
public void startupTopicListener() throws Exception
|
||||
{
|
||||
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
|
||||
connection = (ActiveMQConnection) connectionFactory.createConnection();
|
||||
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(acqUsername, acqPassword, "tcp://localhost:61616");
|
||||
connection = (ActiveMQConnection) connectionFactory.createConnection(acqUsername, acqPassword);
|
||||
connection.start();
|
||||
|
||||
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
@@ -180,8 +186,8 @@ public abstract class EventGeneratorTest extends AbstractContextAwareRepoEvent
|
||||
{
|
||||
System.out.println("Broker at url: '" + url + "'");
|
||||
|
||||
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
|
||||
ActiveMQConnection connection = (ActiveMQConnection) connectionFactory.createConnection();
|
||||
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("admin", "admin", url);
|
||||
ActiveMQConnection connection = (ActiveMQConnection) connectionFactory.createConnection("admin", "admin");
|
||||
try
|
||||
{
|
||||
connection.start();
|
||||
|
||||
@@ -2,8 +2,6 @@ messaging.broker.url=nio://localhost:61616
|
||||
messaging.broker.ssl=false
|
||||
messaging.broker.connections.max=8
|
||||
messaging.transacted=true
|
||||
messaging.broker.username=
|
||||
messaging.broker.password=
|
||||
|
||||
acs.repo.rendition.events.endpoint=jms:acs-repo-rendition-events-test?jmsMessageType=Text
|
||||
acs.repo.transform.request.endpoint=jms:acs-repo-transform-request-test?jmsMessageType=Text
|
||||
acs.repo.transform.request.endpoint=jms:acs-repo-transform-request-test?jmsMessageType=Text
|
||||
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
ports:
|
||||
- "3307:3306"
|
||||
activemq:
|
||||
image: alfresco/alfresco-activemq:5.18.3-jre17-rockylinux8
|
||||
image: alfresco/alfresco-activemq:6.2-jre17-rockylinux8
|
||||
ports:
|
||||
- "5672:5672" # AMQP
|
||||
- "61616:61616" # OpenWire
|
||||
- "61616:61616" # OpenWire
|
||||
|
||||
@@ -12,15 +12,24 @@ services:
|
||||
image: postgres:16.6
|
||||
profiles: ["default", "with-transform-core-aio", "postgres", "with-mtls-transform-core-aio", "with-sso"]
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=alfresco
|
||||
- POSTGRES_USER=alfresco
|
||||
- POSTGRES_DB=alfresco
|
||||
POSTGRES_PASSWORD: alfresco #pragma: allowlist secret
|
||||
POSTGRES_USER: alfresco
|
||||
POSTGRES_DB: alfresco
|
||||
command: postgres -c max_connections=300
|
||||
ports:
|
||||
- "5433:5432"
|
||||
activemq:
|
||||
profiles: ["default", "with-transform-core-aio", "activemq", "with-mtls-transform-core-aio", "with-sso"]
|
||||
image: alfresco/alfresco-activemq:5.18.3-jre17-rockylinux8
|
||||
profiles: ["default", "with-transform-core-aio", "activemq", "activemq6", "with-mtls-transform-core-aio", "with-sso"]
|
||||
image: alfresco/alfresco-activemq:6.2-jre17-rockylinux8
|
||||
environment:
|
||||
ACTIVEMQ_ADMIN_LOGIN: admin
|
||||
ACTIVEMQ_ADMIN_PASSWORD: admin #pragma: allowlist secret
|
||||
ports:
|
||||
- "5672:5672" # AMQP
|
||||
- "61616:61616" # OpenWire
|
||||
activemq5:
|
||||
profiles: ["activemq5"]
|
||||
image: alfresco/alfresco-activemq:5.19-jre17-rockylinux8
|
||||
ports:
|
||||
- "5672:5672" # AMQP
|
||||
- "61616:61616" # OpenWire
|
||||
@@ -61,9 +70,9 @@ services:
|
||||
profiles: ["with-sso"]
|
||||
image: quay.io/keycloak/keycloak:26.5.0
|
||||
environment:
|
||||
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
|
||||
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
|
||||
- KC_DB=dev-file
|
||||
KC_BOOTSTRAP_ADMIN_USERNAME: admin
|
||||
KC_BOOTSTRAP_ADMIN_PASSWORD: admin #pragma: allowlist secret
|
||||
KC_DB: dev-file
|
||||
command: ["start-dev", "--import-realm", "--http-relative-path=/auth", "--hostname=localhost", "--http-enabled=true"]
|
||||
volumes:
|
||||
- ../../../repository/src/test/resources/realms/alfresco-realm.json:/opt/keycloak/data/import/alfresco-realm.json
|
||||
|
||||
Reference in New Issue
Block a user