Changeset 13175 in josm for trunk/test


Ignore:
Timestamp:
2017-12-01T19:28:25+01:00 (7 years ago)
Author:
Don-vip
Message:

see #15310 - minor fixes, performance test still failing

Location:
trunk/test/performance/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java

    r11324 r13175  
    1414import org.apache.commons.lang.RandomStringUtils;
    1515import org.junit.Before;
    16 import org.junit.BeforeClass;
    1716import org.junit.Rule;
    1817import org.junit.Test;
    1918import org.junit.rules.Timeout;
    20 import org.openstreetmap.josm.JOSMFixture;
    2119import org.openstreetmap.josm.PerformanceTestUtils;
    2220import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
    2321import org.openstreetmap.josm.data.osm.OsmDataGenerator.KeyValueDataGenerator;
     22import org.openstreetmap.josm.testutils.JOSMTestRules;
    2423
    2524import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    4847     * Prepare the test.
    4948     */
    50     @BeforeClass
    51     public static void createJOSMFixture() {
    52         JOSMFixture.createPerformanceTestFixture().init(true);
    53     }
     49    @Rule
     50    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     51    public JOSMTestRules test = new JOSMTestRules().projection();
    5452
    5553    /**
  • trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java

    r12783 r13175  
    5050import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    5151
     52/**
     53 * Performance test of map renderer.
     54 */
    5255public class MapRendererPerformanceTest {
    5356
     
    8790    public Timeout globalTimeout = Timeout.seconds(15*60);
    8891
     92    /**
     93     * Initializes test environment.
     94     * @throws Exception if any error occurs
     95     */
    8996    @BeforeClass
    9097    public static void load() throws Exception {
     
    152159    }
    153160
     161    /**
     162     * Cleanup test environment.
     163     */
    154164    @AfterClass
    155165    public static void cleanUp() {
     
    319329
    320330    private static void setFilterStyleActive(boolean active) {
    321         if (filterStyle.active != active) {
    322             MapPaintStyles.toggleStyleActive(filterStyleIdx);
    323         }
    324         Assert.assertEquals(active, filterStyle.active);
     331        if (filterStyle != null) {
     332            if (filterStyle.active != active) {
     333                MapPaintStyles.toggleStyleActive(filterStyleIdx);
     334            }
     335            Assert.assertEquals(active, filterStyle.active);
     336        }
    325337    }
    326338
Note: See TracChangeset for help on using the changeset viewer.