Merge lp:~pbeaman/akiban-persistit/fix-JournalManagerTest into lp:akiban-persistit
Status: | Merged |
---|---|
Approved by: | Nathan Williams |
Approved revision: | 345 |
Merged at revision: | 344 |
Proposed branch: | lp:~pbeaman/akiban-persistit/fix-JournalManagerTest |
Merge into: | lp:akiban-persistit |
Diff against target: |
50 lines (+20/-20) 1 file modified
src/test/java/com/persistit/JournalManagerTest.java (+20/-20) |
To merge this branch: | bzr merge lp:~pbeaman/akiban-persistit/fix-JournalManagerTest |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Review via email: mp+117816@code.launchpad.net |
Description of the change
Fixes a subtle timing-related failure in JournalManagerT
Apparently this problem has been present but undetected for many months.
The problem is timing-related because the getExchange method attempts to look up a cached copy of the Tree from a WeakHashMap. If that lookup is successful then the test succeeds; if it fails then a new Tree object with a freshly instantiated tree handle is created. It appears that GC is more aggressive on the Mac version of the JDK which is where we started to see the failures. This interaction is created by the very special internal twiddling done by this test and is not a general problem.
The modified version of the test passes on Mac and Cent OS.
Since this is a bug in a test, we have no unit test; the fact that the original test passes is confirmation of the fix.
Makes sense.