[
https://issues.apache.org/jira/browse/TOMEE-2977?focusedWorklogId=567058&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-567058
]
ASF GitHub Bot logged work on TOMEE-2977:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Mar/21 15:36
Start Date: 16/Mar/21 15:36
Worklog Time Spent: 10m
Work Description: rmannibucau commented on a change in pull request #767:
URL: https://github.com/apache/tomee/pull/767#discussion_r595289263
##########
File path:
container/openejb-core/src/main/java/org/apache/openejb/junit/jupiter/ApplicationComposerExtensionBase.java
##########
@@ -26,4 +27,36 @@ boolean isPerClass(final ExtensionContext context) {
.map(it -> it.equals(TestInstance.Lifecycle.PER_CLASS))
.orElse(false);
}
+
+ boolean isPerEach(final ExtensionContext context) {
+ return checkMode(context, ExtensionMode.PER_EACH);
+ }
+
+ boolean isPerAll(final ExtensionContext context) {
+ return checkMode(context, ExtensionMode.PER_ALL);
+ }
+
+ boolean isPerJvm(final ExtensionContext context) {
+ return checkMode(context, ExtensionMode.PER_JVM);
+ }
+
+ boolean isPerDefault(final ExtensionContext context) {
+ return checkMode(context, ExtensionMode.AUTO);
+ }
+
+ boolean checkMode(final ExtensionContext context, ExtensionMode
extensionMode ) {
+ return extensionMode == getModeFromAnnotation(context);
+ }
+
+ ExtensionMode getModeFromAnnotation(final ExtensionContext context) {
+ if (context.getTestClass().isPresent()) {
+
+ RunWithApplicationComposer a =
context.getTestClass().get().getAnnotation(RunWithApplicationComposer.class);
Review comment:
AnnotationUtils.findAnnotation ;) (will support junit5 stereotypes
otherwise you loose it by pure reflection)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 567058)
Time Spent: 2h 10m (was: 2h)
> Provide a ApplicationComposer JUnit 5 Extension
> -----------------------------------------------
>
> Key: TOMEE-2977
> URL: https://issues.apache.org/jira/browse/TOMEE-2977
> Project: TomEE
> Issue Type: Improvement
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> ApplicationComposer relies on JUnit4 code. Might be worth to provide a
> ApplicationComposerExtension to run with JUnit 5 only
--
This message was sent by Atlassian Jira
(v8.3.4#803005)