mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Try to improve information on if/when the context won't cleanly shutdown, by making the close more explicit, which will hopefully help with ALF-2485
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19929 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ import org.alfresco.repo.workflow.jbpm.ReviewAndApproveTest;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
@@ -59,6 +60,25 @@ public class WorkflowTestSuite extends TestSuite
|
||||
// context to the other tests
|
||||
suite.addTestSuite( JBPMEngineUnitTest.class );
|
||||
|
||||
// This one will force the suite to shut down the context
|
||||
// properly, which avoids periodic wierd build failures
|
||||
suite.addTestSuite( WorkflowSuiteContextShutdownTest.class );
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
||||
public static class WorkflowSuiteContextShutdownTest extends TestCase {
|
||||
public void testDummy() {}
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
System.err.println("Workflow test suite has completed, shutting down the ApplicationContext...");
|
||||
ApplicationContextHelper.closeApplicationContext();
|
||||
|
||||
Thread.yield();
|
||||
Thread.sleep(25);
|
||||
Thread.yield();
|
||||
|
||||
System.err.println("Workflow test suite shutdown has finished");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user