gnodet commented on code in PR #11249:
URL: https://github.com/apache/maven/pull/11249#discussion_r2425773027
##########
impl/maven-executor/src/test/java/org/apache/maven/cling/executor/impl/ToolboxToolTest.java:
##########
@@ -25,32 +25,43 @@
import java.util.Map;
import eu.maveniverse.maven.mimir.testing.MimirInfuser;
+import org.apache.maven.api.cli.Executor;
import org.apache.maven.api.cli.ExecutorRequest;
import org.apache.maven.cling.executor.ExecutorHelper;
-import org.apache.maven.cling.executor.MavenExecutorTestSupport;
+import org.apache.maven.cling.executor.embedded.EmbeddedMavenExecutor;
+import org.apache.maven.cling.executor.forked.ForkedMavenExecutor;
import org.apache.maven.cling.executor.internal.HelperImpl;
import org.apache.maven.cling.executor.internal.ToolboxTool;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.io.CleanupMode;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
-import static
org.apache.maven.cling.executor.MavenExecutorTestSupport.mvn3ExecutorRequestBuilder;
-import static
org.apache.maven.cling.executor.MavenExecutorTestSupport.mvn4ExecutorRequestBuilder;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
+@Timeout(15)
public class ToolboxToolTest {
- private static final String VERSION = "0.7.4";
+ private static final Executor EMBEDDED_MAVEN_EXECUTOR = new
EmbeddedMavenExecutor();
+ private static final Executor FORKED_MAVEN_EXECUTOR = new
ForkedMavenExecutor();
- @TempDir
- private static Path userHome;
+ private static final String VERSION = "0.13.7";
- @BeforeAll
- static void beforeAll() throws Exception {
+ @TempDir(cleanup = CleanupMode.NEVER)
+ private static Path tempDir;
+
+ private Path userHome;
+
+ @BeforeEach
+ void beforeEach(TestInfo testInfo) throws Exception {
+ userHome =
tempDir.resolve(testInfo.getTestMethod().orElseThrow().getName());
+ Files.createDirectories(userHome);
MimirInfuser.infuseUW(userHome);
+
+ System.out.println("=== " +
testInfo.getTestMethod().orElseThrow().getName());
Review Comment:
Or use proper logging...
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]