|
The current main branch of the JBossTest code is
deploying and undeploying
the test jar on every single unit test method. This
is in contrast to the previous
version that deployed and undeployed the test jar
once for the suite of unit tests.
To restore the previous behavior the deploy and
undeploy need to be moved
out of the TestCase setUp() and tearDown() methods
into a static suite method
as is done in the EJBSpecUnitTestCase:
import org.jboss.test.JBossTestCase;
import org.jboss.test.JBossTestSetup; public class EJBSpecUnitTestCase
extends JBossTestCase { public EJBSpecUnitTestCase(String name) { super(name); } ...
public static Test
suite()
{ TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(EJBSpecUnitTestCase.class)); // Create an
initializer for the test suite
TestSetup wrapper = new JBossTestSetup(suite) { protected void setUp() throws Exception { super.setUp(); deployJ2ee("security-spec.jar"); flushAuthCache(); } protected void tearDown() throws Exception { undeployJ2ee("security-spec.jar"); super.tearDown(); } }; return wrapper; } }
|
