No, flushAuthCache should only be called once for the entire suite.
It could be called in tearDown but doesn't need to be.

----- Original Message -----
From: "David Jencks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 10:45 AM
Subject: Re: [JBoss-dev] Restoring the testsuite deploy/undeploy behavior


> I'm doing this for all the tests where practical.
>
> In your particular example here would it be at least as appropriate to
call
> flushAuthCache for each test rather than for the suite as a whole?  How
> about on tearDown?
>
> david jencks
>
> On 2001.09.18 12:18:30 -0400 Scott M Stark wrote:
> > 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;
> >    }
> > }
> >
> >



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to