Ignore:
Timestamp:
2023-10-16T15:19:07+02:00 (21 months ago)
Author:
taylor.smock
Message:

See #16567: Update to JUnit 5

This converts most tests to use @Annotations. There are also some performance
improvements as it relates to tests.

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

Legend:

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

    r18690 r18870  
    1717import org.junit.jupiter.api.Test;
    1818import org.junit.jupiter.api.Timeout;
    19 import org.junit.jupiter.api.extension.RegisterExtension;
    2019import org.openstreetmap.josm.PerformanceTestUtils;
    2120import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
    2221import org.openstreetmap.josm.data.osm.OsmDataGenerator.KeyValueDataGenerator;
    23 import org.openstreetmap.josm.testutils.JOSMTestRules;
     22import org.openstreetmap.josm.testutils.annotations.Projection;
    2423
    2524import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    2928 * @author Michael Zangl
    3029 */
     30@Projection
    3131@Timeout(value = 15, unit = TimeUnit.MINUTES)
    3232class KeyValuePerformanceTest {
     
    4040
    4141    /**
    42      * Prepare the test.
    43      */
    44     @RegisterExtension
    45     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    46     public JOSMTestRules test = new JOSMTestRules().projection();
    47 
    48     /**
    4942     * See if there is a big difference between Strings that are interned and those that are not.
    5043     */
  • trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java

    r18690 r18870  
    1717import org.junit.jupiter.api.Test;
    1818import org.junit.jupiter.api.Timeout;
    19 import org.openstreetmap.josm.JOSMFixture;
    2019import org.openstreetmap.josm.PerformanceTestUtils;
    2120import org.openstreetmap.josm.data.Bounds;
     
    2524import org.openstreetmap.josm.io.Compression;
    2625import org.openstreetmap.josm.io.OsmReader;
     26import org.openstreetmap.josm.testutils.annotations.Projection;
     27import org.openstreetmap.josm.testutils.annotations.Territories;
    2728
    2829import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    3132 * Abstract superclass of {@code StyledMapRendererPerformanceTest} and {@code WireframeMapRendererPerformanceTest}.
    3233 */
     34@Projection
     35@Territories
    3336@Timeout(value = 15, unit = TimeUnit.MINUTES)
    3437abstract class AbstractMapRendererPerformanceTestParent {
     
    4952
    5053    protected static void load() throws Exception {
    51         JOSMFixture.createPerformanceTestFixture().init(true);
    5254        img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB);
    5355        g = (Graphics2D) img.getGraphics();
Note: See TracChangeset for help on using the changeset viewer.