Ignore:
Timestamp:
2016-06-20T23:57:32+02:00 (10 years ago)
Author:
Don-vip
Message:

see #12974 - Unit tests hang (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

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

    r10441 r10443  
    157157     */
    158158    protected void before() throws InitializationError {
     159        cleanUpFromJosmFixture();
     160
    159161        // Tests are running headless by default.
    160162        System.setProperty("java.awt.headless", "true");
     
    212214
    213215    /**
     216     * Clean up what test not using these test rules may have broken.
     217     */
     218    private void cleanUpFromJosmFixture() {
     219        Main.getLayerManager().resetState();
     220        Main.pref = null;
     221        Main.platform = null;
     222        Main.pref.put("osm-server.url", "invalid-server");
     223        System.gc();
     224    }
     225
     226    /**
    214227     * Clean up after running a test
    215228     */
Note: See TracChangeset for help on using the changeset viewer.