On 2/19/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
In the current code, FactoryFinder.releaseFactories() is called at the *beginning* of the setUp() method. Doesn't that make calling it in tearDown() redundant, because every test (including the first one) is going to call it as part of the setup process anyway?
Craig>I updated the Shale snapshots about half an hour ago... coincidence?
>Wendy
This would have happened w/ or w/out your update.
The fix for this was to put FactoryFinder.releaseFactories() in setup() and in tearDown() . This setup() call is to clear configured Factory info from previous tests ( which taints the first test of the current running TestCase ). The tearDown() call is to prevent interference w/ subsequent TestCases.
In an offlist conversation, Sean and I recently came to the agreement that AbstractJsfTestCase should be calling FactoryFinder.releaseFactories() . This is important because AbstractJsfTestCase.setup() configures each Factory, and AFAIK, it was interfering w/ his tests, which were children of AbstractJsfTestCase. Sean ended up putting this in AbstractJsfTestCase.setup(), probably for the same reason it needs to now go in some of ours.
@ Sean or Wendy or Craig - can one of you please put FactoryFinder.releaseFactories() in AbstractJsfTestCase.tearDown() also ?
In the current code, FactoryFinder.releaseFactories() is called at the *beginning* of the setUp() method. Doesn't that make calling it in tearDown() redundant, because every test (including the first one) is going to call it as part of the setup process anyway?
Dennis Byrne