Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ee3e8f1
Use of GitHub Actions, and enable dependabot
jbonofre Sep 17, 2025
89c1dd4
Include push/PR on activemq-6.1.x and activemq-5.19.x branches
jbonofre Sep 20, 2025
5da03df
Add new runners for the build
jbonofre Sep 20, 2025
2a553d5
Set Java distribution
jbonofre Sep 21, 2025
bf06bb1
Remove surefire rerun options as deprecated
jbonofre Sep 21, 2025
612bb7c
Removing JDK 24 for now as the tests will fail due to the SecurityMan…
jbonofre Sep 21, 2025
f94acbf
Remove JDK 21 as the tests will fail due to SecurityManager
jbonofre Sep 21, 2025
9eb3080
Use separated jobs for build and test (to use different JDK matrix)
jbonofre Sep 22, 2025
891600a
Update right GitHub Action syntax for options
jbonofre Sep 22, 2025
f5338fd
Re-add Jenkinsfile with daily schedule, building only on s390x and in…
jbonofre Sep 22, 2025
7ea48b9
Fix surefire argLine and set memory configuration
jbonofre Sep 22, 2025
ca5e5fd
Temporary ignore JournalCorruptionEofIndexRecoveryTest to test the Gi…
jbonofre Sep 27, 2025
f2e05b9
Remove heap memory setting and renable KahaDB test
jbonofre Dec 12, 2025
24caa5e
Clear separation between development cycle and nightly full check
jeanouii Dec 16, 2025
4db1f61
Adding logs to trigger a new build
jeanouii Dec 16, 2025
7cf0f5a
Revert latest for OS versions
jeanouii Dec 16, 2025
5af2d2e
Do not leak connections while constantly checking if the new connecti…
jeanouii Dec 16, 2025
00a5352
Avoid race conditions by waiting for the log before creating the seco…
jeanouii Dec 17, 2025
8ea0b88
[AMQ-9820]: closed connections leaking into the pool when reconnectOn…
jeanouii Dec 17, 2025
62f3bc2
[AMQ-9820]: More reliable fix to avoid stale connections to remain in…
jeanouii Dec 17, 2025
8846714
[AMQ-9820]: Revert the Pool part so the pool remains usable for asser…
jeanouii Dec 17, 2025
822fe30
try to avoid failures when stats are not fully synchronized
jeanouii Dec 17, 2025
84b41e7
Make sure to keep trying if the first attempt to get a new connection…
jeanouii Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,34 @@ github:
- stomp
- java
- jms

enabled_merge_buttons:
squash: true
merge: true
rebase: true
merge: false
rebase: false

del_branch_on_merge: true

protected_branches:
main:
required_pull_request_reviews:
require_code_owner_reviews: false
required_approving_review_count: 0
required_linear_history: true
required_status_checks:
strict: false
contexts:
- build
- test

features:
wiki: false
issues: false
projects: false

autolink_jira:
- AMQ

notifications:
commits: [email protected]
issues: [email protected]
Expand Down
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 50
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
69 changes: 69 additions & 0 deletions .github/workflows/ci-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: CI Nightly

on:
schedule:
- cron: '0 3 * * *'

jobs:
build:

permissions:
contents: read

strategy:
matrix:
os: [ ubuntu-24.04, ubuntu-22.04, macos-26, macos-15, windows-2025, windows-2022 ]
java-version: [ 17, 21, 24 ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- name: Build
run: mvn -U -B -e clean install -DskipTests
- name: Verify
run: mvn apache-rat:check

test:

permissions:
contents: read

strategy:
matrix:
os: [ ubuntu-24.04, ubuntu-22.04, macos-26, macos-15, windows-2025, windows-2022 ]
java-version: [ 17, 21, 24 ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- name: Test
run: mvn -B -e -fae test
66 changes: 66 additions & 0 deletions .github/workflows/ci-quick.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: CI Quick

on:
push:
branches: [ "main", "activemq-6.1.x", "activemq-5.19.x" ]
pull_request:
branches: [ "main", "activemq-6.1.x", "activemq-5.19.x" ]

jobs:
build:

permissions:
contents: read

strategy:
matrix:
os: [ ubuntu-24.04, macos-26, windows-2025 ]
java-version: [ 17, 21 ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- name: Build
run: mvn -U -B -e clean install -DskipTests
- name: Verify
run: mvn apache-rat:check

test:

permissions:
contents: read

runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Test
run: mvn -B -e -fae test
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Deploy

on:
schedule:
- cron: '0 0 * * *'

jobs:
deploy:

permissions:
contents: read

runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Deploy
run: mvn -B -e deploy -Pdeploy -DskipTests
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pipeline {
}
}

triggers {
cron('0 0 * * *')
}

tools {
// ... tell Jenkins what java version, maven version or other tools are required ...
maven 'maven_3_latest'
Expand All @@ -42,7 +46,7 @@ pipeline {
}

parameters {
choice(name: 'nodeLabel', choices: ['ubuntu', 's390x', 'arm', 'Windows'])
choice(name: 'nodeLabel', choices: [ 's390x'])
choice(name: 'jdkVersion', choices: ['jdk_17_latest', 'jdk_21_latest', 'jdk_24_latest', 'jdk_17_latest_windows', 'jdk_21_latest_windows', 'jdk_24_latest_windows'])
booleanParam(name: 'deployEnabled', defaultValue: false)
booleanParam(name: 'parallelTestsEnabled', defaultValue: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public void start() throws JMSException {
connection.start();
} catch (JMSException e) {
started.set(false);
setHasExpired(true);
if (isReconnectOnException()) {
close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,7 @@ public void destroyObject(ConnectionKey connectionKey, PooledObject<ConnectionPo
@Override
public boolean validateObject(ConnectionKey connectionKey, PooledObject<ConnectionPool> pooledObject) {
ConnectionPool connection = pooledObject.getObject();
if (connection == null || connection.getConnection() == null) {
LOG.trace("Connection has been closed and will be destroyed: {}", connection);
return false;
}

if (connection.expiredCheck()) {
if (connection != null && connection.expiredCheck()) {
LOG.trace("Connection has expired: {} and will be destroyed", connection);
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ public void testFailureGetsNewConnectionOnRetry() throws Exception {
@Override
public boolean isSatisified() throws Exception {
try (final PooledConnection newConnection = (PooledConnection) pooledConnFact.createConnection("invalid", "credentials")) {
return connection1.getConnection() != newConnection.getConnection();
return connection1.pool != ((PooledConnection)newConnection).pool;
} catch (Exception e) {
return false;
}
}
}));

final PooledConnection connection2 = (PooledConnection) pooledConnFact.createConnection("invalid", "credentials");
assertNotSame(connection1.getConnection(), connection2.getConnection());
assertNotSame(connection1.pool, connection2.pool);

try {
connection2.start();
Expand Down Expand Up @@ -233,13 +235,15 @@ public void testFailoverWithInvalidCredentials() throws Exception {
@Override
public boolean isSatisified() throws Exception {
try (final PooledConnection newConnection = (PooledConnection) pooledConnFact.createConnection("invalid", "credentials")) {
return connection1.getConnection() != newConnection.getConnection();
return connection1.pool != ((PooledConnection)newConnection).pool;
} catch (Exception e) {
return false;
}
}
}));

final PooledConnection connection2 = (PooledConnection) pooledConnFact.createConnection("invalid", "credentials");
assertNotSame(connection1.getConnection(), connection2.getConnection());
assertNotSame(connection1.pool, connection2.pool);

try {
connection2.start();
Expand Down Expand Up @@ -410,4 +414,4 @@ protected BrokerPlugin configureAuthorization() throws Exception {

return authorizationPlugin;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@
import org.apache.logging.log4j.core.layout.MessageLayout;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.event.LoggingEvent;


public class JournalCorruptionEofIndexRecoveryTest {

private static final Logger LOG = LoggerFactory.getLogger(JournalCorruptionEofIndexRecoveryTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ public boolean isSatisified() throws Exception {
assertTrue(receivedExceptions.isEmpty());
assertEquals(Integer.valueOf(MESSAGE_COUNT), Integer.valueOf(receivedMessages.size()));

waitForIncludedStatsToUpdate();

//Make sure stats are correct for local -> remote
assertEquals(MESSAGE_COUNT, localBroker.getDestination(includedDestination).getDestinationStatistics().getEnqueues().getCount());
assertEquals(MESSAGE_COUNT, localBroker.getDestination(includedDestination).getDestinationStatistics().getDequeues().getCount());
Expand Down Expand Up @@ -249,6 +251,24 @@ public boolean isSatisified() throws Exception {
remoteConsumer.close();
}

private void waitForIncludedStatsToUpdate() throws Exception {
assertTrue("Included destination stats did not reach expected counts",
Wait.waitFor(new Condition() {
@Override
public boolean isSatisified() throws Exception {
return MESSAGE_COUNT == localBroker.getDestination(includedDestination).getDestinationStatistics().getEnqueues().getCount()
&& MESSAGE_COUNT == localBroker.getDestination(includedDestination).getDestinationStatistics().getDequeues().getCount()
&& MESSAGE_COUNT == localBroker.getDestination(includedDestination).getDestinationStatistics().getForwards().getCount()
&& MESSAGE_COUNT == localBroker.getDestination(includedDestination).getDestinationStatistics().getNetworkDequeues().getCount()
&& 0 == localBroker.getDestination(includedDestination).getDestinationStatistics().getNetworkEnqueues().getCount()
&& MESSAGE_COUNT == remoteBroker.getDestination(includedDestination).getDestinationStatistics().getEnqueues().getCount()
&& 0 == remoteBroker.getDestination(includedDestination).getDestinationStatistics().getForwards().getCount()
&& MESSAGE_COUNT == remoteBroker.getDestination(includedDestination).getDestinationStatistics().getNetworkEnqueues().getCount()
&& 0 == remoteBroker.getDestination(includedDestination).getDestinationStatistics().getNetworkDequeues().getCount();
}
}, 20000, 500));
}

protected void assertNetworkBridgeStatistics(final long expectedLocalSent, final long expectedRemoteSent) throws Exception {

final NetworkBridge localBridge = localBroker.getNetworkConnectors().get(0).activeBridges().iterator().next();
Expand Down
Loading
Loading