Details
-
Task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.5-RC4
-
None
-
None
-
Wicket's own tests
Description
I found that org.apache.wicket.ApplicationSettingsTest was leaking the Application thread local because of wrong usage of @After - the test was JUnit 3 based (i.e. extends TestCase) and thus JUnit4 annotations are ignored.
With this ticket most of the tests that use WicketTester are made to extend WicketTestCase which has proper setUp() and tearDown() methods to start WicketTester and destroy it.
WicketTestCase uses the new WicketJUnitRunner which is a JUnit4 runner that can run both JUnit3 tests and JUnit4 tests. This is needed because many of the old tests are still JUnit3 based. Now they can be easily migrated to JUnit4 when someone needs to touch them.