Changeset 18853 in josm for trunk/test/performance


Ignore:
Timestamp:
2023-10-04T00:03:40+02:00 (14 months ago)
Author:
taylor.smock
Message:

See #16567: Update to JUnit 5

This removes new JOSMTestRules() with no additional setup and most
JOSMFixture calls.

Removing the bare JOSMTestRules speeds up the test suite since there are two
fewer System.gc() calls per test.

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

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java

    r18691 r18853  
    1212import java.util.concurrent.TimeUnit;
    1313
    14 import org.junit.jupiter.api.BeforeAll;
    1514import org.junit.jupiter.api.Test;
    1615import org.junit.jupiter.api.Timeout;
    17 import org.openstreetmap.josm.JOSMFixture;
    1816import org.openstreetmap.josm.PerformanceTestUtils;
    1917import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
     
    3028class OsmReaderPerformanceTest {
    3129    private static final int TIMES = 4;
    32 
    33     /**
    34      * Prepare the test.
    35      */
    36     @BeforeAll
    37     public static void createJOSMFixture() {
    38         JOSMFixture.createPerformanceTestFixture().init(true);
    39     }
    4030
    4131    /**
  • trunk/test/performance/org/openstreetmap/josm/io/OsmWriterPerformanceTest.java

    r18690 r18853  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.io;
    3 
    4 import org.junit.jupiter.api.BeforeAll;
    5 import org.junit.jupiter.api.BeforeEach;
    6 import org.junit.jupiter.api.Test;
    7 import org.junit.jupiter.api.Timeout;
    8 import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.PerformanceTestUtils;
    10 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
    11 import org.openstreetmap.josm.data.osm.DataSet;
    123
    134import java.io.PrintWriter;
    145import java.io.StringWriter;
    156import java.util.concurrent.TimeUnit;
     7
     8import org.junit.jupiter.api.BeforeEach;
     9import org.junit.jupiter.api.Test;
     10import org.junit.jupiter.api.Timeout;
     11import org.openstreetmap.josm.PerformanceTestUtils;
     12import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
     13import org.openstreetmap.josm.data.osm.DataSet;
    1614
    1715/**
     
    2422    private static final int TIMES = 4;
    2523    private DataSet neubrandenburgDataSet;
    26 
    27     /**
    28      * Prepare the test.
    29      */
    30     @BeforeAll
    31     public static void createJOSMFixture() {
    32         JOSMFixture.createPerformanceTestFixture().init(true);
    33     }
    3424
    3525    /**
Note: See TracChangeset for help on using the changeset viewer.