Problem
java-buildpack has no real Spring Boot fixture — every current integration fixture is a fake com.sun.net.httpserver.HttpServer stub with a fake spring-boot-*.jar used only to trip detection. So no integration test can exercise actual Spring Boot runtime behavior (active profiles, VCAP_SERVICES → property mapping, autoconfiguration, framework injection, …). This blocks meaningful end-to-end coverage of the Java frameworks.
Proposal
Stand up genuine Spring Boot fixtures — both SB3 and SB4 — reusing cloudfoundry/java-test-applications instead of committing built jars:
- java-test-applications: modernize
java-main-application + core + spring-common to SB3 and SB4 variants (currently Spring Boot 2.6.7 / JDK 8), expose small observability endpoints (e.g. /active-profiles → Environment#getActiveProfiles(), extend the existing /environment-variables), and publish the built jars as a GitHub release.
- java-buildpack: download the pinned released jars in a
BeforeSuite, deploy via switchblade with bound services, and assert on the app's HTTP responses.
Fat-jar wiring is compatible: the buildpack unwraps Spring Boot and launches -cp ${CLASSPATH}:$HOME/BOOT-INF/lib/* (not java -jar), so buildpack-injected jars and their spring.factories load normally.
First use case: verify java-cfenv activates the cloud profile (SB3 → java-cfenv 3.x, SB4 → 4.0.0) — closes the runtime gap left by #1352. The same fixtures then enable further SB feature tests (service property mapping, autoconfiguration, agent/framework behavior).
Full design / plan: https://gist.github.com/stokpop/c26a89daccf95a821707321627890947
Notes
- Main cost: modernizing java-test-applications (SB 2.6.7 → 3.x/4.1, JDK 8 → 17/21) and adding a publish workflow (it publishes nothing today).
- Also fixes the dead reference at
src/integration/frameworks_test.go:448 (points at a non-existent java-main-application.jar → 404).
Refs #1349, #1352.
Problem
java-buildpack has no real Spring Boot fixture — every current integration fixture is a fake
com.sun.net.httpserver.HttpServerstub with a fakespring-boot-*.jarused only to trip detection. So no integration test can exercise actual Spring Boot runtime behavior (active profiles,VCAP_SERVICES→ property mapping, autoconfiguration, framework injection, …). This blocks meaningful end-to-end coverage of the Java frameworks.Proposal
Stand up genuine Spring Boot fixtures — both SB3 and SB4 — reusing
cloudfoundry/java-test-applicationsinstead of committing built jars:java-main-application+core+spring-commonto SB3 and SB4 variants (currently Spring Boot 2.6.7 / JDK 8), expose small observability endpoints (e.g./active-profiles→Environment#getActiveProfiles(), extend the existing/environment-variables), and publish the built jars as a GitHub release.BeforeSuite, deploy via switchblade with bound services, and assert on the app's HTTP responses.Fat-jar wiring is compatible: the buildpack unwraps Spring Boot and launches
-cp ${CLASSPATH}:$HOME/BOOT-INF/lib/*(notjava -jar), so buildpack-injected jars and theirspring.factoriesload normally.First use case: verify java-cfenv activates the
cloudprofile (SB3 → java-cfenv3.x, SB4 →4.0.0) — closes the runtime gap left by #1352. The same fixtures then enable further SB feature tests (service property mapping, autoconfiguration, agent/framework behavior).Full design / plan: https://gist.github.com/stokpop/c26a89daccf95a821707321627890947
Notes
src/integration/frameworks_test.go:448(points at a non-existentjava-main-application.jar→ 404).Refs #1349, #1352.