Skip to content

Give the pipeline developer examples the test resource key - #108

Merged
jwrosewell merged 1 commit into
rcfrom
fix/developer-examples-resource-key
Nov 11, 2026
Merged

jwrosewell merged 1 commit into
rcfrom
fix/developer-examples-resource-key

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The problem

Every Java full build fails at "Pipeline developer examples" since #59 merged, whatever the pull request changes. In the full build of #79, run 43051980968, Ubuntu Java 17 failed there with:

ExampleTests.SimpleCloudEngine_Test:45 This test runs the cloud engine example against the live 51Degrees cloud service, so it needs a resource key. None of _51DEGREES_RESOURCE_KEY, RESOURCE_KEY, _51DEGREES_RESOURCE_KEY_BESPOKE, T...

and the other eight jobs were cancelled with it.

ci/run-integration-tests.ps1 runs the pipeline developer examples' ExampleTests a second time, after the unit test run has already run them with -DTestResourceKey=$TestResourceKey, and the second run passed no key (line 36 at cf7e5e28). Before #59 the cloud engine example's test skipped when it had no key, so the second run passed. #59 makes a cloud test fail rather than pass without calling the cloud, so the second run now fails.

What changes

ci/run-integration-tests.ps1 passes "-DTestResourceKey=$TestResourceKey" to that mvn test, as the example build further down the same script does (line 62) and as ci/run-unit-tests.ps1 does. The cloud engine example's Main reads TestResourceKey as an environment variable or a system property, and Surefire hands the Maven property to the tests as a system property.

I checked every other mvn run under ci/. build-project.ps1, build-package-requirements.ps1 and the package step skip tests, the unit test run passes the key, and the two performance runs (*ShareUsageOverheadTests* and *Performance*) call no cloud service. So this is the only test run that started a cloud example without the key.

How it was checked

Each test run is a throwaway branch with a temporary workflow that builds the pipeline reactor and runs the step's mvn test -Dtest=ExampleTests on Ubuntu with Java 17.

Run Link Result
Red, the command as on rc run 43056744712 SimpleCloudEngine_Test fails with the message above, 1 of 1 in pipeline.developerexamples.cloudengine.ExampleTests
Green, with -DTestResourceKey run 43056761879 SimpleCloudEngine_Test passes, and the build succeeds
Full pull request build run 43056838310 Head ec7bc30, on rc at cf7e5e2. All 9 jobs without macOS passed, being Ubuntu Java 8, 11, 17 and 21, Ubuntu ARM Java 17, and Windows Java 8, 11, 17 and 21, and pipeline.developerexamples.cloudengine.ExampleTests passed in the integration step. Every Setting 'PullRequestSha' line, in Configure and in each of the 9 jobs, is ec7bc30, and Configure printed "Left out 6 macOS entries"

macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.

What remains

Nothing for this change. Every Java draft built on rc from cf7e5e2 until this merges fails at the same step, so #79, #97, #102 and #107 build after it.

Version

No version change.

The integration step runs the pipeline developer examples' ExampleTests
again without the key the unit test run passes, and the cloud engine
example's test now fails when it has no key rather than skipping, so
every full build failed there. The step now passes -DTestResourceKey as
the example build below it does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant