Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an integration test using qpid brokerj #52

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
67 changes: 67 additions & 0 deletions .github/workflows/ci_integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Generic JMS RA for WildFly QPID Integration Test

on:
- pull_request
env:
WILDFLY_VERSION: 31.0.1.Final
GENERIC_RA_VERSION: 3.1.1-SNAPSHOT
WILDFLY_HOME: /home/runner/work/wildfly

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.ref || github.run_id }}'
cancel-in-progress: true
jobs:
container-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start Qpid
run: |
mkdir -p /home/runner/work/qpid-broker-j/work
cp -f /home/runner/work/generic-jms-ra/generic-jms-ra/.github/workflows/integration/work/*.* /home/runner/work/qpid-broker-j/work
docker run -d -p 5672:5672 -p 9080:8080 --name qpid -v /home/runner/work/qpid-broker-j/work:/qpid-broker-j/work quay.io/ehugonne/qpid-brokerj:9.2.0
- name: Set up JDK adopt 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Build
run: |
mvn -ntp -U -B -fae clean install
- name: Build example
run: |
pushd qpid-example
mvn -ntp -U -B -fae clean install
popd
- name: Prepare WildFly
run: |
pushd /home/runner/work
ls -la
wget https://github.com/wildfly/wildfly/releases/download/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz
tar -xvzf wildfly-$WILDFLY_VERSION.tar.gz && mv wildfly-$WILDFLY_VERSION wildfly
mkdir -p wildfly/modules/system/layers/base/org/jboss/genericjms/provider/main/.
cp -f /home/runner/work/generic-jms-ra/generic-jms-ra/.github/workflows/integration/*.* $WILDFLY_HOME/modules/system/layers/base/org/jboss/genericjms/provider/main/.
cp -f /home/runner/work/generic-jms-ra/generic-jms-ra/generic-jms-ra-jar/target/generic-jms-ra-jar-$GENERIC_RA_VERSION.jar $WILDFLY_HOME/modules/system/layers/base/org/jboss/genericjms/main/generic-jms-ra-jar-3.0.0.Final.jar
cp -f /home/runner/work/generic-jms-ra/generic-jms-ra/qpid-example/ejb/target/remote-mdb-ejb-1.0.0.jar $WILDFLY_HOME/standalone/deployments/remote-mdb-ejb.jar
$WILDFLY_HOME/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!'
$WILDFLY_HOME/bin/jboss-cli.sh --file=/home/runner/work/generic-jms-ra/generic-jms-ra/qpid-example/qpid.cli
- name: Start WildFly
run: |
$WILDFLY_HOME/bin/standalone.sh -c standalone-full.xml &
- name: Run client
run: |
pushd /home/runner/work/generic-jms-ra/generic-jms-ra/qpid-example/client
mvn "-Dexec.args=-classpath %classpath org.wildfly.jms.demo.qpid.client.HelloWorld" -Dexec.executable=java -Dexec.classpathScope=runtime org.codehaus.mojo:exec-maven-plugin:3.1.0:exec
popd
- name: Stop WildFly
run: |
$WILDFLY_HOME/bin/jboss-cli.sh -c --commands=shutdown
- name: Delete container
run: |
docker stop qpid
docker rm qpid


27 changes: 27 additions & 0 deletions .github/workflows/integration/module.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.8" name="org.jboss.genericjms.provider">
<resources>
<resource-root path="qpid-jms-client-2.5.0.jar"/>
<resource-root path="qpid-jms-discovery-2.5.0.jar"/>
</resources>
<dependencies>
<!-- To get access to the slf4j API -->
<module name="org.slf4j"/>
<module name="org.slf4j.impl"/>
<!-- To get access to the javax.naming API -->
<module name="javax.api"/>
<module name="jakarta.jms.api" export="true"/>
<module name="io.netty.netty-buffer"/>
<module name="io.netty.netty-codec"/>
<module name="io.netty.netty-codec-http"/>
<module name="io.netty.netty-common"/>
<module name="io.netty.netty-handler"/>
<module name="io.netty.netty-resolver"/>
<module name="io.netty.netty-transport"/>
<module name="io.netty.netty-transport-native-epoll"/>
<module name="io.netty.netty-transport-native-kqueue"/>
<module name="io.netty.netty-transport-native-unix-common"/>
<module name="org.apache.qpid.proton" />
</dependencies>
</module>

Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions .github/workflows/integration/work/broker.acl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.

# account 'admin' - enabled all actions
ACL ALLOW-LOG admin ALL ALL
102 changes: 102 additions & 0 deletions .github/workflows/integration/work/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"id" : "f3618bb8-c35e-4c53-86e7-7367cceac97e",
"name" : "${broker.name}",
"modelVersion" : "9.1",
"accesscontrolproviders" : [ {
"id" : "d1429171-5514-4134-81ab-f26c5a2e430a",
"name" : "brokerAcl",
"type" : "AclFile",
"path" : "/qpid-broker-j/work/broker.acl",
"lastUpdatedBy" : null,
"lastUpdatedTime" : null,
"createdBy" : null,
"createdTime" : null
} ],
"authenticationproviders" : [ {
"id" : "bb364823-dd51-4736-85c3-5e8e27acd0e6",
"name" : "plain",
"type" : "Plain",
"secureOnlyMechanisms" : [ ],
"users" : [ {
"id" : "e3dd60a9-25cd-4db1-8630-4779431be788",
"name" : "${QPID_ADMIN_USER}",
"type" : "managed",
"password" : "${QPID_ADMIN_PASSWORD}"
} ]
} ],
"brokerloggers" : [ {
"id" : "7c93c5f9-749f-40a1-97ca-9b4fb42e1a36",
"name" : "console",
"type" : "Console",
"brokerloginclusionrules" : [ {
"id" : "0295c43b-ad81-4bfd-9475-f6d0010b939d",
"name" : "Operational",
"type" : "NameAndLevel",
"level" : "INFO",
"loggerName" : "qpid.message.*"
}, {
"id" : "6863a269-bcd7-43ce-a8fc-354f2e67ecda",
"name" : "Qpid",
"type" : "NameAndLevel",
"level" : "INFO",
"loggerName" : "org.apache.qpid.*"
}, {
"id" : "e9f8575b-2fea-43bb-abc0-436a11ca48e6",
"name" : "Root",
"type" : "NameAndLevel",
"level" : "INFO",
"loggerName" : "ROOT"
}, {
"id" : "6cab31ad-f144-46d0-951a-61ee9dc4beb2",
"name" : "Statistics",
"type" : "NameAndLevel",
"level" : "INFO",
"loggerName" : "qpid.statistics.*"
} ]
} ],
"plugins" : [ {
"id" : "da5370a8-2e18-46c4-81ad-216c4a9c71ae",
"type" : "MANAGEMENT-HTTP",
"name" : "httpManagement",
"httpBasicAuthenticationEnabled" : true
} ],
"ports" : [ {
"id" : "be46835c-aec3-40cd-b251-c26a6ab3ffcc",
"name" : "AMQP",
"port" : "${qpid.amqp_port}",
"authenticationProvider" : "plain",
"virtualhostaliases" : [ {
"id" : "19100479-0280-4ffa-9ece-f6d3cc7b5043",
"name" : "defaultAlias",
"type" : "defaultAlias"
}, {
"id" : "f3457529-e889-4ff8-bb21-1929c2777500",
"name" : "hostnameAlias",
"type" : "hostnameAlias"
}, {
"id" : "7b4f6a5a-0bd8-4feb-852e-414f6d0ad962",
"name" : "nameAlias",
"type" : "nameAlias"
} ]
}, {
"id" : "a86caadc-6d47-4247-a8fb-669d49f52972",
"name" : "HTTP",
"port" : "${qpid.http_port}",
"authenticationProvider" : "plain",
"protocols" : [ "HTTP" ]
} ],
"virtualhostnodes" : [ {
"id" : "3bf4bec7-28b4-4cd2-85aa-3e3dcc709601",
"name" : "default",
"type" : "JSON",
"defaultVirtualHostNode" : "true",
"preferenceStoreAttributes" : {
"type" : "JSON",
"attributes" : {
"path" : "/qpid-broker-j/work"
}
},
"storePath" : "/qpid-broker-j/work",
"virtualHostInitialConfiguration" : "{}"
} ]
}
42 changes: 42 additions & 0 deletions .github/workflows/integration/work/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"id" : "fa72b7a7-ba09-4a16-9078-491a5b65a65e",
"name" : "default",
"modelVersion" : "9.0",
"type" : "BDB",
"storePath" : "/qpid-broker-j/work/messages",
"storeUnderfullSize" : "0",
"storeOverfullSize" : "0",
"context" : {
"qpid.broker.bdbCommiterNotifyThreshold" : "8",
"qpid.broker.bdbCommiterWaitTimeout" : "500",
"queue.defaultMaximumQueueDepthMessages" : "1000",
"queue.defaultMaximumQueueDepthBytes" : "1048576"
},
"queues" : [ {
"id" : "31ec1322-88d5-4870-9112-be62acd0df8d",
"name" : "outQueue",
"type" : "standard",
"durable" : true,
"alternateBinding" : null,
"holdOnPublishEnabled" : false,
"messageDurability" : "ALWAYS",
"owner" : null,
"lastUpdatedBy" : "admin",
"lastUpdatedTime" : 1710493994817,
"createdBy" : "admin",
"createdTime" : 1710493994817
}, {
"id" : "5d72858e-e8fd-4afd-8254-4665c023c787",
"name" : "testQueue",
"type" : "standard",
"durable" : true,
"alternateBinding" : null,
"holdOnPublishEnabled" : false,
"messageDurability" : "ALWAYS",
"owner" : null,
"lastUpdatedBy" : "admin",
"lastUpdatedTime" : 1710493982005,
"createdBy" : "admin",
"createdTime" : 1710493982005
} ]
}
Binary file not shown.
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions .github/workflows/integration/work/preferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"preferences" : [ ],
"version" : "9.1"
}
4 changes: 4 additions & 0 deletions .github/workflows/integration/work/userPreferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"preferences" : [ ],
"version" : "9.1"
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>38</version>
<version>39</version>
</parent>

<artifactId>generic-jms-ra-pom</artifactId>
Expand Down
75 changes: 75 additions & 0 deletions qpid-example/client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wildfly.jms.demo</groupId>
<artifactId>qpid-parent</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>org.wildfly.jms.demo.client</groupId>
<artifactId>qpid-jms-examples</artifactId>
<name>Qpid JMS Client</name>
<description>Apache Qpid JMS Client to produce and consume messages</description>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-jms-client</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<scope>compile</scope>
</dependency>

<!-- Provide a logging implementation to avoid
notice from SLF4J that none was found -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.36</version>
</dependency>
</dependencies>

<profiles>
<profile>
<id>exclude-native-transport-deps</id>
<dependencies>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-jms-client</artifactId>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Loading
Loading