cloudfoundry / cloudfoundry/cf-java-client
Integration tests fail: test-service-broker.jar incompatible with java-buildpack v5 (JDK 17 default)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 334
- Fork
- 319
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong integration-test/src/test/java/org/cloudfoundry/ServiceBrokerUtils.java tại pushServiceBrokerApplication(), sau đó kiểm tra ApplicationUtils.java và ngữ cảnh của test-service-broker.jar đi kèm. Chạy các bài kiểm thử tích hợp phụ thuộc vào serviceBrokerId và xác nhận rằng broker khởi động trên java-buildpack v5/JDK 17 mà không gặp DelayTimeoutException.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, spring-boot
- Lĩnh vực
- backend, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- Nửa ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 74/100