Skip to content

Integration tests: real Spring Boot apps, Java 25 default - #1551

Open
stokpop wants to merge 2 commits into
cloudfoundry:mainfrom
stokpop:test-real-spring-boot-apps-java25
Open

stokpop wants to merge 2 commits into
cloudfoundry:mainfrom
stokpop:test-real-spring-boot-apps-java25

Conversation

@stokpop

@stokpop stokpop commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

The tests used hand-made fake fixtures (spring_boot_staged, spring_boot_multi_framework, apps/integration_valid, frameworks/java_cf_boot_3): a 60-line JDK web server with a fake spring-boot-1.0.0.RELEASE.jar, on Java 11. They are replaced by the real Spring Boot apps from java-test-applications v1.0.1, which the suite already downloads.

  • Tests that do not exercise a specific Java version run on Java 25 (defaultJavaVersion). Tests named after a version or JRE keep theirs, and Java 8 and 11 stay covered by the Tomcat, DistZip and JavaMain suites.
  • New matrix test: Spring Boot 3 on Java 17, 21 and 25, Spring Boot 4 on Java 21 and 25.
  • The /jvm-args checks use /input-arguments and /system-properties of the real app; the Java CF Env test now expects Java CF Env for a real Spring Boot app (the fake was not a Spring 3 app).
  • JRebel tests deploy a copy of the jar with rebel-remote.xml added (appWithFile).
  • Eventually default timeout 40 s to 2 minutes: the real apps start slower (JRebel adds about 40 s).

Verified: Docker, cflinuxfs4, zip built from this branch, same settings as scripts/integration.sh (3 nodes, uncached zip): 130 tests, 121 passed, 0 failed, 9 skipped (the usual vendor-credential skips), 31 minutes.

Overlap: #1550 also touches testdata/README.md and the java_cf_boot_3 jar. Whichever merges second needs a small rebase.

Follow-up: about 50 of the tests that now use the real Spring Boot 4.1 app (nearly all of the Frameworks suite and the Java Opts tests) do not need Spring, only a JVM that answers on /. A later PR will move them to a dependency-free JDK test app (simple-java-application, starts in under a second, runs on Java 8 and up) and add runtime assertions for the agents.

Replace the hand-made spring_boot_staged, spring_boot_multi_framework,
integration_valid and java_cf_boot_3 fixtures with the Spring Boot 3 and 4.1
apps from java-test-applications. Tests run on Java 25 unless they exercise a
specific Java version, and a matrix covers Spring Boot 3 (Java 17/21/25) and
4 (Java 21/25). Raise the default Eventually timeout to 2 minutes for the
slower real apps.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the integration-test fixture and Java-version updates.

No open issues 🎉

What changed in this PR

This PR makes the Java buildpack’s integration tests more representative by replacing fake Spring Boot fixtures with real downloaded applications and using Java 25 for version-independent tests.

Changes:

  • Replace obsolete fixtures with real Spring Boot apps, runtime diagnostic endpoints, and temporary JRebel-enabled copies.
  • Add a Spring Boot 3/4 Java-version matrix while retaining version-specific coverage.
  • Increase the default polling timeout to two minutes and document fixture usage.
File Description
src/​integration/​tomcat_test.go Moves version-independent Tomcat tests to Java 25.
src/​integration/​testdata/​README.md Documents downloaded apps, structural stubs, and small fixtures.
src/​integration/​testdata/​frameworks/​java_cf_boot_3/​META-INF/​MANIFEST.MF Removes the fake Java CF Env fixture manifest.
src/​integration/​testdata/​frameworks/​java_cf_boot_3/​bin/​application Removes the fake Java CF Env fixture launcher.
src/​integration/​testdata/​containers/​spring_boot_staged/​src/​SimpleSpringBootApp.java Removes a fake Spring Boot server implementation.
src/​integration/​testdata/​containers/​spring_boot_staged/​src/​SimpleJava.java Removes the obsolete staged fixture’s Java server.
src/​integration/​testdata/​containers/​spring_boot_staged/​META-INF/​MANIFEST.MF Removes the staged fixture manifest.
src/​integration/​testdata/​containers/​spring_boot_staged/​bin/​application Removes the staged fixture launcher.
src/​integration/​testdata/​containers/​spring_boot_multi_framework/​src/​SimpleSpringBootApp.java Removes the multi-framework fixture’s fake Spring Boot server.
src/​integration/​testdata/​containers/​spring_boot_multi_framework/​src/​SimpleJava.java Removes the multi-framework fixture’s Java server.
src/​integration/​testdata/​containers/​spring_boot_multi_framework/​rebel-remote.xml Removes static JRebel configuration, now added by a helper.
src/​integration/​testdata/​containers/​spring_boot_multi_framework/​META-INF/​MANIFEST.MF Removes the multi-framework fixture manifest.
src/​integration/​testdata/​containers/​spring_boot_multi_framework/​bin/​application Removes the multi-framework fixture launcher.
src/​integration/​testdata/​apps/​integration_valid/​system.properties Removes the retired fixture’s Java runtime setting.
src/​integration/​testdata/​apps/​integration_valid/​META-INF/​MANIFEST.MF Removes the retired fixture’s manifest.
src/​integration/​testdata/​apps/​integration_valid/​BOOT-INF/​lib/​.gitignore Retires the old fixture’s library-directory placeholder.
src/​integration/​spring_boot_test.go Uses real apps and diagnostic endpoints; adds the Java-version matrix.
src/​integration/​ratpack_test.go Uses the shared Java default.
src/​integration/​play_test.go Uses the shared Java default.
src/​integration/​java_main_test.go Updates version-independent tests to the shared Java default.
src/​integration/​init_test.go Extends polling timeouts and supplies real apps to framework tests.
src/​integration/​groovy_test.go Uses the shared Java default.
src/​integration/​frameworks_test.go Replaces fake apps and updates runtime versions and response assertions.
src/​integration/​dist_zip_test.go Updates version-independent tests to the shared Java default.
src/​integration/​container_detection_test.go Uses the shared Java default for selected detection tests.
src/​integration/​app_fixtures_test.go Adds the Java default, fixture availability checks, and app-copy helpers.

Review effort: Balanced

kiril-keranov
kiril-keranov previously approved these changes Nov 19, 2026

@kiril-keranov kiril-keranov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine

@stokpop

stokpop commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts on this branch.

Resolve the conflicts with cloudfoundry#1550:
- frameworks/java_cf_boot_3: keep the deletion, the fixture is replaced by the real Spring Boot apps.
- testdata/README.md: merge both versions. Keep the sections about the downloaded real apps, and the stub notes of cloudfoundry#1550 (manifests, no_container_* cases, the 324 byte Spring stubs) that still apply.
@stokpop

stokpop commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Merged main into the branch to resolve the conflicts with #1550 (the testdata README and the java_cf_boot_3 jar). The diff against main is otherwise the same as the one you approved, so it should be a quick re-approve.

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.

3 participants