|
56 | 56 |
|
57 | 57 | - name: Run Consumer Pact Tests |
58 | 58 | # -am builds the apache-client + springboot-server reactor deps the |
59 | | - # pact-tests module pulls in. |
| 59 | + # pact-tests module pulls in. We also pass |
| 60 | + # -Dsurefire.failIfNoSpecifiedTests=false so that surefire does NOT |
| 61 | + # fail the build when -Dtest=NamespaceApiPactTest matches no test in |
| 62 | + # the upstream apache-client / springboot-server modules (those |
| 63 | + # generated modules contain no Pact tests by design — the tests live |
| 64 | + # only in lance-namespace-pact-tests). |
60 | 65 | working-directory: java |
61 | | - run: mvn -pl lance-namespace-pact-tests -am -Dspotless.skip=true -Dtest=NamespaceApiPactTest test |
| 66 | + run: mvn -pl lance-namespace-pact-tests -am -Dspotless.skip=true -Dsurefire.failIfNoSpecifiedTests=false -Dtest=NamespaceApiPactTest test |
62 | 67 |
|
63 | 68 | - name: Publish Pacts to Broker |
64 | 69 | # Phase 4 guard: only publish when PACT_BROKER_URL secret is configured. |
@@ -226,8 +231,10 @@ jobs: |
226 | 231 | - name: Run Provider Pact Verification |
227 | 232 | # -am pulls in apache-client + springboot-server, both required by |
228 | 233 | # the pact-tests module's test classpath (PactTestApplication, fixtures). |
| 234 | + # See consumer-java for why -Dsurefire.failIfNoSpecifiedTests=false is |
| 235 | + # required (apache-client / springboot-server contain no PactProviderTest). |
229 | 236 | working-directory: java |
230 | | - run: mvn -pl lance-namespace-pact-tests -am -Dspotless.skip=true -Dtest=PactProviderTest -Dspring.profiles.active=pact test |
| 237 | + run: mvn -pl lance-namespace-pact-tests -am -Dspotless.skip=true -Dsurefire.failIfNoSpecifiedTests=false -Dtest=PactProviderTest -Dspring.profiles.active=pact test |
231 | 238 |
|
232 | 239 | # ───────────────────────────────────────────────────────────────────────── |
233 | 240 | # Can-I-Deploy: only on main with Pact Broker configured |
|
0 commit comments