cloudfoundry / cloudfoundry/cf-java-client
Integration tests fail: test-service-broker.jar incompatible with java-buildpack v5 (JDK 17 default)
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 334
- フォーク
- 319
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
On March 20-21, 2026, the java-buildpack main branch was updated to v5.0.1, which defaults to JDK 17 (up from JDK 8 in v4.x).
The integration tests hardcode buildpack("https://github.com/cloudfoundry/java-buildpack.git") in ApplicationUtils.java:230, so they now get JDK 17. The bundled test-service-broker.jar is a Spring Boot 1.5.16 app (built ~2018) that relies on CGLIB reflective access incompatible with JDK 17's module system. The app crashes on startup with InaccessibleObjectException, causing DelayTimeoutException and failing all tests that depend on serviceBrokerId.
Workaround
Add --add-opens flags to the service broker environment in ServiceBrokerUtils.pushServiceBrokerApplication():
env.put("JAVA_OPTS",
"--add-opens java.base/java.lang=ALL-UNNAMED"
+ " --add-opens java.base/java.io=ALL-UNNAMED");
Potential longer-term fixes
- Rebuild test-service-broker.jar with a modern Spring Boot version
- Pin the buildpack to a version tag or use the system buildpack instead of tracking main
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
integration-test/src/test/java/org/cloudfoundry/ServiceBrokerUtils.java の pushServiceBrokerApplication() から開始し、その後 ApplicationUtils.java と同梱された test-service-broker.jar のコンテキストを調べます。serviceBrokerId に依存する統合テストを実行し、broker が java-buildpack v5/JDK 17 で DelayTimeoutException なしに起動することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, spring-boot
- 領域
- backend, testing-qa
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 半日
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 74/100