Issue Details (XML | Word | Printable)

Key: SPR-4702
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Sam Brannen
Reporter: Noel Flicken
Votes: 4
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
Spring Framework

Support for @DirtiesContext at the test class level

Created: 14/Apr/08 09:06 PM   Updated: 06/Jul/09 01:12 PM   Resolved: 06/Jul/09 01:07 PM
Component/s: SpringTEST
Affects Version/s: None
Fix Version/s: 3.0 M4

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
Related
 


 Description  « Hide

Expected behavior:
Context should be close()'d after end of test class execution

Observed behavior:
Context only closed when @DirtiesContext annotates method

Multiple test classes can re-use the same context, which allows for faster test execution, so automatically closing a context after test class execution is probably not the best mechanism.

However, there should be a way to annotate that a context should be close()'d after all tests in a test class are executed.

Suggested fix:

  • allow @DirtiesContext to annotate class
  • add TestExecutionListener#destroyTestInstance

Willing to implementing, if given approval of design.



No work has yet been logged on this issue.