Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,14 @@ protected void before(ExtensionContext context) {
// ExtensionContext.Store.CloseableResource registered in the class-level (parent) context
// is invoked by JUnit when the class scope closes
var classContext = oneNamespacePerClass ? context : context.getParent().orElse(context);
classContext
.getStore(ExtensionContext.Namespace.create(LocallyRunOperatorExtension.class))
.computeIfAbsent(CrdCleanup.class, ignored -> new CrdCleanup(deleteCRDs));
var store =
classContext.getStore(ExtensionContext.Namespace.create(LocallyRunOperatorExtension.class));
try {
store.computeIfAbsent(CrdCleanup.class, ignored -> new CrdCleanup(deleteCRDs));
} catch (NoSuchMethodError nsme) {
// Exists to retain compatibility with Junit5.
store.getOrComputeIfAbsent(CrdCleanup.class, ignored -> new CrdCleanup(deleteCRDs));
}
Comment on lines +366 to +371
Copy link
Copy Markdown
Contributor Author

@k-wall k-wall May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


LOGGER.debug("Starting the operator locally");
this.operator.start();
Expand Down
Loading