Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4
-
Fix Version/s: 3.1
-
Component/s: Class Extension
-
Labels:None
-
Number of attachments :
Description
If I lose all references to a mock in a test, it may (or may not) get GCed before the test is over. If it does happen, this creates an expectation of a call to finalize(), making the test fail. Since the GC is unpredictable, this leads to flaky tests.
We should treat finalize() specially, probably by ignoring it completely, since it makes no sense to expect it given that there's no way to force GC.
Activity
Henri Tremblay
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 3.1 [ 17672 ] | |
| Resolution | Fixed [ 1 ] |
Henri Tremblay
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
finalize calls are now ignored