Ignore:
Timestamp:
2016-07-22T23:03:22+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390, fix #13120 - Use a new memory manager for imagery layers (patch by michael2402) - gsoc-core - requires java 8

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java

    r10569 r10588  
    1919import org.openstreetmap.josm.io.OsmTransferCanceledException;
    2020import org.openstreetmap.josm.tools.I18n;
     21import org.openstreetmap.josm.tools.MemoryManagerTest;
    2122import org.openstreetmap.josm.tools.date.DateUtils;
    2223
     
    3940    private boolean platform;
    4041    private boolean useProjection;
     42    private boolean allowMemoryManagerLeaks;
    4143
    4244    /**
     
    130132    public JOSMTestRules projection() {
    131133        useProjection = true;
     134        return this;
     135    }
     136
     137    /**
     138     * Allow the memory manager to contain items after execution of the test cases.
     139     * @return this instance, for easy chaining
     140     */
     141    public JOSMTestRules memoryManagerLeaks() {
     142        allowMemoryManagerLeaks = true;
    132143        return this;
    133144    }
     
    218229    @SuppressFBWarnings("DM_GC")
    219230    private void cleanUpFromJosmFixture() {
     231        MemoryManagerTest.resetState(true);
    220232        Main.getLayerManager().resetState();
    221233        Main.pref = null;
     
    237249        // Remove all layers
    238250        Main.getLayerManager().resetState();
     251        MemoryManagerTest.resetState(allowMemoryManagerLeaks);
    239252
    240253        // TODO: Remove global listeners and other global state.
Note: See TracChangeset for help on using the changeset viewer.