From 7d0a1dfae1e0d6a45a267952d1b785d193d956cd Mon Sep 17 00:00:00 2001 From: Brenton Strickler Date: Fri, 6 Mar 2026 22:20:58 -0500 Subject: [PATCH 1/2] Exclude cloud/Docker integration tests from default test run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Real* tests (S3/Azure credentials) and Azurite tests (Docker) fail hard in CI environments without credentials or Docker. Exclude them from the default surefire run and add Maven profile + Makefile targets: make test — unit tests only (default) make test-cloud — cloud/Docker integration tests only make test-all — everything (mvn test -Pintegration-tests) --- Makefile | 16 +++++++++++++--- pom.xml | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e892cda..54ecaa0 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,15 @@ MVN := mvn # --------------------------------------------------------------------------- # Targets # --------------------------------------------------------------------------- -.PHONY: help setup compile test package clean +# Integration test patterns (cloud/Docker tests excluded from default run) +INTEGRATION_EXCLUDES = **/Real*Test.java,**/AzureIntegrationTest.java,**/AzureOAuthTokenTest.java +INTEGRATION_INCLUDES = **/Real*Test.java,**/AzureIntegrationTest.java,**/AzureOAuthTokenTest.java + +.PHONY: help setup compile test test-cloud test-all package clean help: ## Show this help message @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ - awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' + awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' setup: ## Install/verify development dependencies (Java 11, Maven, Rust, protoc) ./scripts/setup.sh @@ -25,9 +29,15 @@ setup: ## Install/verify development dependencies (Java 11, Maven, Rust, protoc) compile: ## Compile sources (Java + Rust native via cargo) $(MVN) clean compile -test: ## Run JUnit 5 tests +test: ## Run unit tests (excludes cloud/Docker integration tests) $(MVN) test +test-cloud: ## Run cloud/Docker integration tests only (requires credentials/Docker) + $(MVN) test -Dtest="$(INTEGRATION_INCLUDES)" -DfailIfNoTests=false + +test-all: ## Run all tests (unit + cloud/Docker integration) + $(MVN) test -Pintegration-tests + package: ## Build JAR, skip tests (mvn clean package -DskipTests) $(MVN) clean package -DskipTests diff --git a/pom.xml b/pom.xml index fb946b0..610ff4d 100644 --- a/pom.xml +++ b/pom.xml @@ -209,6 +209,13 @@ 1 filesystem + + + **/Real*Test.java + **/AzureIntegrationTest.java + **/AzureOAuthTokenTest.java + ${surefire.argLine} @@ -562,6 +569,23 @@ + + + integration-tests + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + + + + jdk17plus-native-access From 31ff6fb1800fc30cdf5b8764da16d8e4ee043e1c Mon Sep 17 00:00:00 2001 From: Brenton Strickler Date: Fri, 6 Mar 2026 22:50:23 -0500 Subject: [PATCH 2/2] Fix Makefile test-cloud pattern format for surefire -Dtest --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 54ecaa0..1e5b134 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,8 @@ MVN := mvn # --------------------------------------------------------------------------- # Targets # --------------------------------------------------------------------------- -# Integration test patterns (cloud/Docker tests excluded from default run) -INTEGRATION_EXCLUDES = **/Real*Test.java,**/AzureIntegrationTest.java,**/AzureOAuthTokenTest.java -INTEGRATION_INCLUDES = **/Real*Test.java,**/AzureIntegrationTest.java,**/AzureOAuthTokenTest.java +# Integration test class patterns for -Dtest (simple class name globs, not ANT paths) +INTEGRATION_TESTS = Real*Test,AzureIntegrationTest,AzureOAuthTokenTest .PHONY: help setup compile test test-cloud test-all package clean @@ -33,7 +32,7 @@ test: ## Run unit tests (excludes cloud/Docker integration tests) $(MVN) test test-cloud: ## Run cloud/Docker integration tests only (requires credentials/Docker) - $(MVN) test -Dtest="$(INTEGRATION_INCLUDES)" -DfailIfNoTests=false + $(MVN) test -Dtest="$(INTEGRATION_TESTS)" -DfailIfNoTests=false test-all: ## Run all tests (unit + cloud/Docker integration) $(MVN) test -Pintegration-tests