This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
The following commit(s) were added to refs/heads/master by this push:
new 8150055 another stab at completely removing test flakiness: ensure
each test runs using a different workDir
8150055 is described below
commit 8150055a7b3ff65dfa994193e1740d16f9be08a3
Author: juanpablo <[email protected]>
AuthorDate: Wed Dec 9 15:26:44 2020 +0100
another stab at completely removing test flakiness: ensure each test runs
using a different workDir
so there is no chance one test reuses the wkflmgr.ser from another test.
This should allow tests to be run in a random order..
---
.../src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
b/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
index 9e8f871..9d18afd 100644
---
a/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
+++
b/jspwiki-main/src/test/java/org/apache/wiki/workflow/WorkflowManagerTest.java
@@ -30,6 +30,8 @@ import org.junit.jupiter.api.Test;
import java.io.File;
+import static org.apache.wiki.TestEngine.with;
+
public class WorkflowManagerTest {
@@ -39,7 +41,7 @@ public class WorkflowManagerTest {
@BeforeEach
public void setUp() throws Exception {
- m_engine = TestEngine.build();
+ m_engine = TestEngine.build( with( "jspwiki.workDir",
"./target/test-classes/WorkflowManagerTests/" + System.currentTimeMillis() ) );
wm = m_engine.getManager( WorkflowManager.class );
// Create a workflow with 3 steps, with a Decision in the middle
w = new Workflow( "workflow.key", new WikiPrincipal( "Owner1" ) );