ensure event managers are unregistered
@@ -24,6 +24,7 @@ import org.apache.wiki.api.exceptions.WikiException;
import org.apache.wiki.auth.GroupPrincipal;
import org.apache.wiki.auth.WikiPrincipal;
import org.apache.wiki.event.WorkflowEvent;
+import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -39,6 +40,7 @@ public class WorkflowManagerTest {
@BeforeEach
public void setUp() throws Exception {
+ m_engine = TestEngine.build();
wm = new DefaultWorkflowManager();
wm.initialize( m_engine, TestEngine.getTestProperties() );
// Create a workflow with 3 steps, with a Decision in the middle
@@ -54,6 +56,11 @@ public class WorkflowManagerTest {
w.addMessageArgument( "MyPage" );
}
+ @AfterEach
+ public void tearDown() {
+ m_engine.shutdown();
+ }
+
@Test
public void testStart() throws WikiException {
// Once we start the workflow, it should show that it's started and the WM should have assigned it an ID
