-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Tests
-
None
As mentioned in this comment from PR #591 and PR #564, failing to end a session in a test where an exception is thrown could cause future test methods to encounter delays in execution. This is mainly an issue with transaction tests, where an exception's backtrace can hold a reference to the session object and prevent it from being garbage-collected after the test function exits.
If the test class is able to track sessions that are used within tests (e.g. creating them through a convenience method instead of directly calling Manager::startSession() within the test), we should be able to hold a reference to them and ensure they are explicitly ended in tearDown(). This would allow us to remove try / finally code blocks in various tests that currently work around this issue.
- is cloned by
-
PHPLIB-400 Track collections used during tests to explicitly drop them in tearDown()
- Backlog
- related to
-
PHPLIB-400 Track collections used during tests to explicitly drop them in tearDown()
- Backlog