Changeset 11781 in josm for trunk/test


Ignore:
Timestamp:
2017-03-26T13:52:10+02:00 (7 years ago)
Author:
michael2402
Message:

Update StyleCacheTest: Clear the style cache before each test. Add documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java

    r11778 r11781  
    1717import org.junit.Rule;
    1818import org.junit.Test;
    19 import org.openstreetmap.josm.JOSMFixture;
    2019import org.openstreetmap.josm.Main;
    2120import org.openstreetmap.josm.data.Bounds;
     
    5352    @Rule
    5453    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    55     public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().mapStyles();
     54    public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().mapStyles().timeout(60000);
    5655
    5756    /**
     
    112111    @Test
    113112    public void testStyleCacheInternPool() {
    114         // This can be removed if there was no dependency on Main.map in some MapCSS conditions. See #14572
    115         JOSMFixture.createFunctionalTestFixture().init(true);
    116 
     113        StyleCache.clearStyleCachePool();
    117114        Bounds bounds = new Bounds(53.56, 13.25, 53.57, 13.26);
    118115        Rendering visitor = new StyledMapRenderer(g, nc, false);
     
    141138    @Test
    142139    public void testStyleCacheInternPool2() {
    143         // This can be removed if there was no dependency on Main.map in some MapCSS conditions. See #14572
    144         JOSMFixture.createFunctionalTestFixture().init(true);
    145 
     140        StyleCache.clearStyleCachePool();
    146141        Bounds bounds = new Bounds(53.56, 13.25, 53.57, 13.26);
    147142        Rendering visitor = new StyledMapRenderer(g, nc, false);
Note: See TracChangeset for help on using the changeset viewer.