FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix junit tests when jdk11 is used. #1255 by Lokowandtg · Pull Request #1259 · cloudfoundry/cf-java-client · GitHub

Repository navigation

fix junit tests when jdk11 is used. #1255 - #1259

Merged
Kehrlann merged 3 commits into
cloudfoundry:mainfrom
Lokowandtg:FixUnitTests-Java11
May 28, 2025
Merged

Kehrlann merged 3 commits into
cloudfoundry:mainfrom
Lokowandtg:FixUnitTests-Java11

Conversation

Copy link
Copy Markdown
Contributor

In cloudfoundry-operations there are 32 JUnit errors when jdk 11 or jdk 17 are used. Those are fixed with this change. So far not tested with later jdks.
fixes #1255

Copy link
Copy Markdown
Contributor

please rebase on main

Copy link
Copy Markdown
Contributor

I could assert this PR fixes the 32 Junit errors on Java 17 AND Java 21. Thank you! 🙏

@Lokowandtg can you please in your branch your update the CI to :

  • delete .github/workflows/ci-java-17-and-21.yml
  • rename .github/workflows/ci-java-8-and-11.yml to .github/workflows/ci-java.yml
  • in .github/workflows/ci-java.yml add 17, 21 to:
      matrix:
        java: [ 8, 11 ]

and then replace

      - if: ${{ matrix.java != 8 }}

with

      - if: ${{ matrix.java == 11 }}

Thanks again!

Copy link
Copy Markdown
Contributor

@Lokowandtg thanks for your contribution!

I'm picking this back up.
On my own main branch, all tests in cloudfoundry-operations pass on JDK 11 ; am I missing something?

Copy link
Copy Markdown
Contributor Author

@Kehrlann thanks for having a look!
JDK 8 and JDK 21 worked in my setup out of main. JDK 11 and JDK 17 had the same problems in cloudfoundry-operations.
According to @anthonydahanne some merges in december fixed JDK 11 but not JDK 17. So can you test your main branch on JDK 17? Maybe I have to fix the title of this pull request.
P.S.: At the moment I am working on JDK 24 and Eclipse 2025.

Copy link
Copy Markdown
Contributor

I've tried locally, and as Anthony pointed out, it works fine 🎉

Spotless should work on JDK11+ , so I'd recommend keeping the original:

      - if: ${{ matrix.java != 8 }}

And then I'll merge this.

Kehrlann self-assigned this May 28, 2025
in cloudfoundry-operations there are 32 JUnit errors when
jdk 11 or jdk17 are used. Those are fixed with this change.
So far not tested with later jdks.
Lokowandtg force-pushed the FixUnitTests-Java11 branch from 0c480e7 to 29b9a60 Compare May 28, 2025 13:44
Kehrlann self-requested a review May 28, 2025 14:02
Kehrlann added this to the 6.0.0 release milestone May 28, 2025

Kehrlann 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good, thanks for your contribution!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Unit tests fail when java compiler 11 or 17 is used

3 participants


Back | FazBrowse Home | New Git URL