Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eclipse-ee4j/openmq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.5.1-RELEASE
Choose a base ref
...
head repository: eclipse-ee4j/openmq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 811 changed files with 5,146 additions and 7,069 deletions.
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Apply tidy:pom changes
636796a8e78dd6ab364e4953874bddda56807ec5

# Sort ecj.prefs
f674a0e3bca520ef54b1313609afc5a9e5b4fbca
1 change: 1 addition & 0 deletions .github/workflows-etc/it-ldap/admin-ldap.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
imq.imqcmd.password=mqadmiin2
1 change: 1 addition & 0 deletions .github/workflows-etc/it-ldap/admin.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
imq.imqcmd.password=admin
15 changes: 15 additions & 0 deletions .github/workflows-etc/it-ldap/ldap-data.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dn: ou=people,dc=openmq,dc=eclipse,dc=org
objectClass: organizationalUnit
objectClass: top
ou: people

dn: uid=mqadmin,ou=people,dc=openmq,dc=eclipse,dc=org
cn: MQ Admin
givenName: MQAdmin
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
sn: MQAdmin
uid: mqadmin
userPassword: mqadmiin2
165 changes: 165 additions & 0 deletions .github/workflows/GH-2272.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
#
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0,
# or the Eclipse Distribution License v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#

on:
workflow_call:
inputs:
java_version:
required: true
type: string
java_distribution:
required: false
type: string
default: 'temurin'
java_package:
required: false
type: string
default: 'jre'
mq_distribution_artifact:
required: false
type: string
default: 'mq-distribution'

jobs:
test-cluster-messages-GH-2272:
name: Test Message Handling In Cluster GH-2272
runs-on: ubuntu-latest
env:
CLUSTER_VAR_HOME: cluster-var
DISTRIBUTION_ROOT: mq-distribution
MQ_DISTRIBUTION_HOME: mq-distribution/mq

steps:
- name: Download MQ Distribution
uses: actions/download-artifact@v4
with:
name: ${{ inputs.mq_distribution_artifact }}
- name: Unzip MQ Distribution
run: unzip -q -d ${DISTRIBUTION_ROOT} mq.zip
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: ${{ inputs.java_distribution }}
java-version: ${{ inputs.java_version }}
java-package: ${{ inputs.java_package }}
- name: Prepare admin passfile
run: echo imq.imqcmd.password=admin > admin.pass
- name: Start brokers
env:
JAVA_TOOL_OPTIONS: "-enableassertions"
run: |
for brokerPort in 7670 7680 7690
do
nohup ${MQ_DISTRIBUTION_HOME}/bin/imqbrokerd \
-cluster :7670,:7680,:7690 \
-name ClusterBroker-${brokerPort} \
-port ${brokerPort} \
-varhome ${CLUSTER_VAR_HOME} >brokerd-${brokerPort}.log 2>&1 &
done
- name: Wait for cluster to start
timeout-minutes: 2
run: |
for brokerPort in 7670 7680 7690
do
for otherBrokerPort in 7670 7680 7690
do
if [ ${brokerPort} -ne ${otherBrokerPort} ]
then
while [ true ]
do
grep \
--with-filename \
--extended-regexp \
"Established cluster connection to broker mq://[[:digit:]\.]{7,15}:${otherBrokerPort}" \
${CLUSTER_VAR_HOME}/instances/ClusterBroker-${brokerPort}/log/log.txt && break
sleep 10s
done
fi
done
done
- name: List cluster brokers
env:
JAVA_TOOL_OPTIONS: "-enableassertions"
run: |
${MQ_DISTRIBUTION_HOME}/bin/imqcmd \
-u admin \
-passfile admin.pass \
-b :7670 list bkr | tee list-bkr.log
- name: Send several messages to 7670
run: |
for id in Oscar Papa Echo November Mike Quebec
do
java \
-cp ${MQ_DISTRIBUTION_HOME}/lib/jms.jar:${MQ_DISTRIBUTION_HOME}/lib/imq.jar:${MQ_DISTRIBUTION_HOME}/examples/helloworld/helloworldmessage \
-DimqAddressList=mq://localhost:7670/jms \
-DHelloWorldMessage.receive=false \
HelloWorldMessage ${id}
done | tee send.log
- name: Receive several messages with timeout from other nodes
run: |
for brokerPort in 7680 7690 7680 7690 7680 7690
do
java \
-cp ${MQ_DISTRIBUTION_HOME}/lib/jms.jar:${MQ_DISTRIBUTION_HOME}/lib/imq.jar:${MQ_DISTRIBUTION_HOME}/examples/helloworld/helloworldmessage \
-DimqAddressList=mq://localhost:${brokerPort}/jms \
-DHelloWorldMessage.send=false \
-DHelloWorldMessage.receiveTimeoutMillis=10000 \
HelloWorldMessage $@
done | tee receive.log
- name: List destinations
env:
JAVA_TOOL_OPTIONS: "-enableassertions"
run: |
for brokerPort in 7670 7680 7690
do
${MQ_DISTRIBUTION_HOME}/bin/imqcmd \
-u admin \
-passfile admin.pass \
-b :${brokerPort} \
list dst
done | tee list-dst.log
- name: Verify expected messages
run: |
for id in Oscar Papa Echo November Mike Quebec
do
grep --silent "Read Message: Hello World: ${id}" receive.log || echo "Missing: ${id}" | tee -a missing.log
done
test ! -s missing.log
- name: Stop cluster
timeout-minutes: 2
if: always()
env:
JAVA_TOOL_OPTIONS: "-enableassertions"
run: |
for brokerPort in 7670 7680 7690
do
${MQ_DISTRIBUTION_HOME}/bin/imqcmd \
-f \
-u admin \
-passfile admin.pass \
-b :${brokerPort} \
shutdown bkr 2>/dev/null &
done
wait
- name: Upload logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-cluster-messages-GH-2272-logs
path: |
brokerd-*.log
list-bkr.log
send.log
receive.log
list-dst.log
missing.log
${{ env.CLUSTER_VAR_HOME }}/instances/*/log/log.txt
15 changes: 15 additions & 0 deletions .github/workflows/analyses.yml
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ jobs:
java_version: [ 21 ]
tool:
- javac+error-prone
- ecj
- dependency:analyze
- pmd
- cpd
@@ -49,6 +50,19 @@ jobs:
run: cp -v .mvn/jvm.config.error-prone .mvn/jvm.config
- name: Test Maven Build
run: |
if [ ${{ matrix.tool == 'ecj' }} ]
then
LOMBOKLOC=$(./mvnw \
--quiet \
--file mq/main \
--non-recursive \
dependency:properties \
help:evaluate \
--activate-profiles staging,ecj \
--define forceStdout \
--define expression=lombok.repo.location)
export MAVEN_OPTS="-javaagent:${LOMBOKLOC}=ECJ"
fi
./mvnw \
--show-version \
--no-transfer-progress \
@@ -57,5 +71,6 @@ jobs:
--file mq/main \
verify \
--projects -packager-opensource \
--define skipSBOM \
--define skipTests=true
Loading