[
https://issues.apache.org/jira/browse/TOMEE-2977?focusedWorklogId=563105&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-563105
]
ASF GitHub Bot logged work on TOMEE-2977:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Mar/21 14:46
Start Date: 09/Mar/21 14:46
Worklog Time Spent: 10m
Work Description: rzo1 commented on a change in pull request #767:
URL: https://github.com/apache/tomee/pull/767#discussion_r590433216
##########
File path:
container/openejb-core/src/main/java/org/apache/openejb/junit/jupiter/ApplicationComposerExtension.java
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.junit.jupiter;
+
+import org.apache.openejb.OpenEJBRuntimeException;
+import org.apache.openejb.testing.ApplicationComposers;
+import org.junit.jupiter.api.extension.*;
+
+public class ApplicationComposerExtension implements BeforeEachCallback,
AfterEachCallback {
Review comment:
Thx. I updated things related to 2. and 3.
I have to think about 1. (because I think, that I didnt get it) and read /
study the documentation related to `DynamicTests` in JUnit 5. Do you have an
example of "splitting test definitions into multiple classes"?
Might get you wrong, but did you refer to `Test Instance Lifecycles` when
talking about `@ApplicationComposer(mode = [PER_JVM|PER_ALL|PER_EACH])` ?
So we get smth like this, if the mode is specified?
- PER_JVM --> `SingleApplicationComposerExtension` (like TomEE embedded?)
- PER_ALL --> `@TestInstance(Lifecycle.PER_CLASS)` // new test instance
will be created once per test class.
- PER_EACH --> `@TestInstance(Lifecycle.PER_METHOD)` // a new test instance
will be created for each test method, test factory method, or test template
method (default in JUnit 4)
----------------------------------------------------------------
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: 563105)
Time Spent: 1h (was: 50m)
> 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: 1h
> 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)