Skip to content
Merged
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
c668654
Add SSL integration tests and support for SSL connections in ActiveMQ
prachya-saechua-cpaxtra Feb 16, 2026
108ca68
Add comprehensive SSL integration tests for OpenWire protocol
prachya-saechua-cpaxtra Feb 18, 2026
e39c48d
Replace README.txt with README.md for improved documentation format a…
prachya-saechua-cpaxtra Feb 18, 2026
aa375a9
Update SSL configuration in docker-compose and activemq-ssl.xml for c…
prachya-saechua-cpaxtra Feb 18, 2026
f05e033
Enhance OpenSSLSocket to handle non-blocking sockets and improve erro…
prachya-saechua-cpaxtra Feb 18, 2026
b1deb06
Enhance Openwire SSL Tests with Improved Listener and Transaction Han…
prachya-saechua-cpaxtra Feb 18, 2026
f37c198
Implement automatic SSL certificate generation and update documentation
prachya-saechua-cpaxtra Feb 18, 2026
390eb4d
Refactor integration tests to separate OpenWire and STOMP tests, and …
prachya-saechua-cpaxtra Feb 18, 2026
943b149
Enhance SSL integration tests with comprehensive coverage and add new…
prachya-saechua-cpaxtra Feb 18, 2026
785b881
Refactor OpenWire SSL Tests and Enhance SSL Configuration
prachya-saechua-cpaxtra Feb 18, 2026
1abc630
Add <cstdint> include to SocketFileDescriptor and FileDescriptor headers
prachya-saechua-cpaxtra Feb 18, 2026
53aca34
Update CI configuration for Windows SSL integration tests and refine …
prachya-saechua-cpaxtra Feb 18, 2026
c342804
Remove commented SSL configuration examples from main.cpp
prachya-saechua-cpaxtra Feb 18, 2026
770ea01
Refactor SSL support configuration to use AMQCPP_USE_SSL instead of H…
prachya-saechua-cpaxtra Feb 18, 2026
9da7c5f
Remove Windows SSL integration test job from CI configuration
prachya-saechua-cpaxtra Feb 18, 2026
0cd37b1
Refactor thread destruction logic to improve synchronization and prev…
prachya-saechua-cpaxtra Feb 18, 2026
65220af
Refactor SSL test source inclusion in CMakeLists.txt for transport an…
prachya-saechua-cpaxtra Feb 18, 2026
8b6972e
Update integration test commands in CI configuration to use exact lab…
prachya-saechua-cpaxtra Feb 18, 2026
7a97303
Add test suite delimiter configuration for CTest in settings.json
prachya-saechua-cpaxtra Feb 18, 2026
45f1207
Refactor thread destruction logic to improve synchronization and prev…
prachya-saechua-cpaxtra Feb 18, 2026
c53aef3
Refactor CmsSendWithAsyncCallbackTest to improve connection and desti…
blackb1rd Feb 18, 2026
2f2ed5e
Disable TLS 1.3 in OpenSSLContextSpi to prevent race conditions durin…
blackb1rd Feb 18, 2026
19546bc
Add crash handlers for Flight Recorder to capture dumps on exceptions…
prachya-saechua-cpaxtra Feb 18, 2026
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
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Auto detect text files and perform LF normalization
* text=auto

# Shell scripts must always use LF (Unix) line endings
*.sh text eol=lf

# Windows batch files must use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
124 changes: 109 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
run: chmod +x output/build/${{ matrix.config.preset }}/bin/*

- name: Run benchmarks
run: ctest --preset ${{ matrix.config.preset }} -L benchmark --output-on-failure --timeout 600
run: ctest --preset ${{ matrix.config.preset }} -L ^benchmark$ --output-on-failure --timeout 600

- name: Upload test results
if: failure()
Expand All @@ -227,12 +227,11 @@ jobs:
strategy:
fail-fast: false
matrix:
# Use release build for integration tests (one config to avoid excessive combinations)
# Use no-SSL release build for non-SSL integration tests
config:
- { preset: x64-linux-release-test, build_type: Release }
- { preset: x64-linux-release-no-ssl-test, build_type: Release }
# Test with multiple ActiveMQ versions
activemq:
- { name: "AMQ-5.15", image: "rmohr/activemq:5.15.9" }
- { name: "AMQ-5.18", image: "apache/activemq-classic:5.18.7" }
- { name: "AMQ-6.2", image: "apache/activemq-classic:6.2.0" }

Expand Down Expand Up @@ -282,8 +281,11 @@ jobs:
- name: Show broker status
run: docker compose ps

- name: Run integration tests (${{ matrix.activemq.name }})
run: ctest --preset ${{ matrix.config.preset }} -L integration --output-on-failure --timeout 900
- name: Run OpenWire integration tests (${{ matrix.activemq.name }})
run: ctest --preset ${{ matrix.config.preset }} -L ^integration-openwire$ --output-on-failure --timeout 900

- name: Run STOMP integration tests (${{ matrix.activemq.name }})
run: ctest --preset ${{ matrix.config.preset }} -L ^integration-stomp$ --output-on-failure --timeout 900

- name: Show broker logs on failure
if: failure()
Expand All @@ -304,10 +306,103 @@ jobs:
output/build/${{ matrix.config.preset }}/Testing/Temporary/
output/build/${{ matrix.config.preset }}/**/*.log

# Linux system tests - run separately with multiple ActiveMQ versions
# Linux SSL integration tests - run with SSL-enabled broker (Linux only)
linux-ssl-integration-test:
name: Linux SSL Integration Test
runs-on: ubuntu-latest
needs: linux-build-test

env:
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/.cache/vcpkg/archives,read"

strategy:
fail-fast: false
matrix:
# Only test with SSL-enabled presets (release build)
config:
- { preset: x64-linux-release-test, build_type: Release }
# Test with ActiveMQ versions that support SSL
activemq:
- { name: "AMQ-5.18", image: "apache/activemq-classic:5.18.7" }
- { name: "AMQ-6.2", image: "apache/activemq-classic:6.2.0" }

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build

- name: Set VCPKG_ROOT environment variable
run: echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV

- name: Create vcpkg binary cache directory
run: mkdir -p "${{ github.workspace }}/.cache/vcpkg/archives"

- name: Cache vcpkg binary packages
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.cache/vcpkg/archives
key: vcpkg-binary-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-binary-${{ runner.os }}-

- name: Configure CMake (for CTest)
run: cmake --preset ${{ matrix.config.preset }}

- name: Download build artifacts
uses: actions/download-artifact@v7
with:
name: linux-build-${{ matrix.config.preset }}
path: output/build/${{ matrix.config.preset }}/

- name: Make test executables runnable
run: chmod +x output/build/${{ matrix.config.preset }}/bin/*

- name: Start SSL broker (${{ matrix.activemq.name }})
run: |
echo "Starting SSL-enabled ActiveMQ using image: ${{ matrix.activemq.image }}"
ACTIVEMQ_IMAGE=${{ matrix.activemq.image }} docker compose --profile ssl up -d
echo "Waiting for SSL broker to be ready..."
timeout 60 bash -c 'until docker compose --profile ssl ps | grep -q "healthy"; do sleep 2; done' || true
sleep 10

- name: Show broker status
run: docker compose --profile ssl ps

- name: Show broker logs (startup)
run: docker compose --profile ssl logs --tail 50

- name: Run OpenWire SSL integration tests (${{ matrix.activemq.name }})
run: ctest --preset ${{ matrix.config.preset }} -L integration-openwire-ssl --output-on-failure --timeout 900
env:
SSL_CERT_FILE: ${{ github.workspace }}/docker/ssl/certs/ca.pem

- name: Show broker logs on failure
if: failure()
run: |
echo "=== ActiveMQ SSL broker logs ==="
docker compose --profile ssl logs --tail 200 || true

- name: Stop SSL broker
if: always()
run: docker compose --profile ssl down

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v6
with:
name: test-results-ssl-integration-${{ matrix.activemq.name }}
path: |
output/build/${{ matrix.config.preset }}/Testing/Temporary/
output/build/${{ matrix.config.preset }}/**/*.log

# Linux integration benchmark tests - run separately with multiple ActiveMQ versions
# Tests failover, multi-connection, and high-volume scenarios
linux-system-test:
name: Linux System Test
linux-integration-benchmark-test:
name: Linux Integration Benchmark Test
runs-on: ubuntu-latest
needs: linux-build-test

Expand All @@ -317,12 +412,11 @@ jobs:
strategy:
fail-fast: false
matrix:
# Use release build for system tests (one config to avoid excessive combinations)
# Use release build for integration benchmark tests (one config to avoid excessive combinations)
config:
- { preset: x64-linux-release-test, build_type: Release }
# Test with multiple ActiveMQ versions
activemq:
- { name: "AMQ-5.15", image: "rmohr/activemq:5.15.9" }
- { name: "AMQ-5.18", image: "apache/activemq-classic:5.18.7" }
- { name: "AMQ-6.2", image: "apache/activemq-classic:6.2.0" }

Expand Down Expand Up @@ -371,8 +465,8 @@ jobs:
- name: Show broker status
run: docker compose --profile failover ps

- name: Run system tests (${{ matrix.activemq.name }})
run: ctest --preset ${{ matrix.config.preset }} -L system --output-on-failure --timeout 1800
- name: Run integration benchmark tests (${{ matrix.activemq.name }})
run: ctest --preset ${{ matrix.config.preset }} -L integration-benchmark --output-on-failure --timeout 1800

- name: Show broker logs on failure
if: failure()
Expand All @@ -392,7 +486,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v6
with:
name: test-results-system-${{ matrix.activemq.name }}
name: test-results-integration-benchmark-${{ matrix.activemq.name }}
path: |
output/build/${{ matrix.config.preset }}/Testing/Temporary/
output/build/${{ matrix.config.preset }}/**/*.log
Expand Down Expand Up @@ -657,7 +751,7 @@ jobs:
path: output/build/${{ matrix.config.preset }}/

- name: Run benchmarks
run: ctest --preset ${{ matrix.config.preset }} -C ${{ matrix.config.build_type }} -L benchmark --output-on-failure --timeout 600
run: ctest --preset ${{ matrix.config.preset }} -C ${{ matrix.config.build_type }} -L ^benchmark$ --output-on-failure --timeout 600

- name: Upload test results
if: failure()
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ configure
output/
.cache/

# Generated SSL certificates for integration testing
docker/ssl/certs/



3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@
"test": {
"enabled": true
}
}
},
"cmake.ctest.testSuiteDelimiter": "/"
}
31 changes: 10 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,7 @@ option(AMQCPP_USE_SSL "Enable OpenSSL support (required when ON)" OFF)

if(AMQCPP_USE_SSL)
find_package(OpenSSL REQUIRED)
message(STATUS "AMQCPP: SSL support enabled; OpenSSL will be required.")

# If OpenSSL was found, define HAVE_OPENSSL for the code so sources
# can use `#ifdef HAVE_OPENSSL` to enable OpenSSL-dependent features.
if(OpenSSL_FOUND)
message(STATUS "AMQCPP: Found OpenSSL ${OPENSSL_VERSION}")
add_compile_definitions(HAVE_OPENSSL)
set(AMQCPP_HAVE_OPENSSL ON CACHE INTERNAL "OpenSSL available")
else()
message(STATUS "AMQCPP: OpenSSL not found; HAVE_OPENSSL will not be defined")
set(AMQCPP_HAVE_OPENSSL OFF CACHE INTERNAL "OpenSSL available")
endif()
message(STATUS "AMQCPP: SSL support enabled; found OpenSSL ${OPENSSL_VERSION}")
else()
find_package(OpenSSL QUIET)
message(STATUS "AMQCPP: SSL support disabled; OpenSSL will be optional.")
Expand Down Expand Up @@ -213,7 +202,7 @@ if(AMQCPP_BUILD_TESTS)
add_subdirectory(activemq-cpp/src/test)
add_subdirectory(activemq-cpp/src/test-benchmarks)
add_subdirectory(activemq-cpp/src/test-integration)
add_subdirectory(activemq-cpp/src/test-system)
add_subdirectory(activemq-cpp/src/test-integration-benchmarks)

# =========================================================================
# Integration & System Test Workflow Targets
Expand All @@ -232,21 +221,21 @@ if(AMQCPP_BUILD_TESTS)
COMMENT "Full integration test workflow (start broker, test, stop broker)..."
)

# System tests: start all brokers (failover profile), run tests, stop brokers
add_custom_target(system-full
# Integration benchmark tests: start all brokers (failover profile), run tests, stop brokers
add_custom_target(integration-benchmark-full
COMMAND docker compose --profile failover up -d
COMMAND ${CMAKE_COMMAND} -E sleep 15
COMMAND ${CMAKE_COMMAND} -E echo "Running system tests..."
COMMAND $<TARGET_FILE:neoactivemq-system-test>
COMMAND ${CMAKE_COMMAND} -E echo "Running integration benchmark tests..."
COMMAND $<TARGET_FILE:neoactivemq-integration-benchmark-test>
COMMAND docker compose --profile failover down
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS neoactivemq-system-test
COMMENT "Full system test workflow (start all brokers, test, stop brokers)..."
DEPENDS neoactivemq-integration-benchmark-test
COMMENT "Full integration benchmark test workflow (start all brokers, test, stop brokers)..."
)

message(STATUS "Test workflow targets:")
message(STATUS " cmake --build --preset <preset> --target integration-full # Integration tests (auto Docker)")
message(STATUS " cmake --build --preset <preset> --target system-full # System tests (auto Docker)")
message(STATUS " cmake --build --preset <preset> --target integration-full # Integration tests (auto Docker)")
message(STATUS " cmake --build --preset <preset> --target integration-benchmark-full # Integration benchmark tests (auto Docker)")
endif()

# Installation rules
Expand Down
Loading
Loading