| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds a runtime fallback for registering CrdCleanup to retain compatibility across different JUnit 5 ExtensionContext.Store API versions.
Changes:
Sorry, something went wrong.
| try { | ||
| store.computeIfAbsent(CrdCleanup.class, ignored -> new CrdCleanup(deleteCRDs)); | ||
| } catch (NoSuchMethodError nsme) { | ||
| // Exists to retains compatibility with Junit5. | ||
| store.getOrComputeIfAbsent(CrdCleanup.class, ignored -> new CrdCleanup(deleteCRDs)); | ||
| } |
There was a problem hiding this comment.
Not too convinced by Copilot's advice here. The reminder why the call to the deprecated method is made is helpful IMO. Using reflection would be overkill.
Sorry, something went wrong.
Signed-off-by: Keith Wall <kwall@apache.org>
There was a problem hiding this comment.
LGTM, since this should not break JUnit 6, I don't see why not merge it.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
As described by #3354, this change restores Junit5 compatibility for users using LocallyRunOperatorExtension in a stack that has not upgraded to Junit6.