[ 
https://issues.apache.org/jira/browse/TOMEE-2977?focusedWorklogId=567064&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-567064
 ]

ASF GitHub Bot logged work on TOMEE-2977:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Mar/21 15:50
            Start Date: 16/Mar/21 15:50
    Worklog Time Spent: 10m 
      Work Description: rzo1 commented on a change in pull request #767:
URL: https://github.com/apache/tomee/pull/767#discussion_r595302374



##########
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:
       Thx. Changed it.




----------------------------------------------------------------
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: 567064)
    Time Spent: 2h 20m  (was: 2h 10m)

> 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 20m
>  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)

Reply via email to