Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (3 years ago)
Author:
Don-vip
Message:

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

File:
1 edited

Legend:

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

    r16913 r17275  
    22package org.openstreetmap.josm.io;
    33
    4 import static org.junit.Assert.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    66import java.io.ByteArrayInputStream;
     
    1010import java.io.IOException;
    1111import java.io.InputStream;
     12import java.util.concurrent.TimeUnit;
    1213
    13 import org.junit.BeforeClass;
    14 import org.junit.Rule;
    15 import org.junit.Test;
    16 import org.junit.rules.Timeout;
     14import org.junit.jupiter.api.BeforeAll;
     15import org.junit.jupiter.api.Test;
     16import org.junit.jupiter.api.Timeout;
    1717import org.openstreetmap.josm.JOSMFixture;
    1818import org.openstreetmap.josm.PerformanceTestUtils;
    1919import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
    2020import org.openstreetmap.josm.data.osm.DataSet;
    21 
    22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2321
    2422/**
     
    2927 * @author Michael Zangl
    3028 */
    31 public class OsmReaderPerformanceTest {
     29@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
     30class OsmReaderPerformanceTest {
    3231    private static final int TIMES = 4;
    3332    private static final String DATA_FILE = "nodist/data/neubrandenburg.osm.bz2";
    3433
    3534    /**
    36      * Global timeout applied to all test methods.
    37      */
    38     @Rule
    39     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    40     public Timeout globalTimeout = Timeout.seconds(15*60);
    41 
    42     /**
    4335     * Prepare the test.
    4436     */
    45     @BeforeClass
     37    @BeforeAll
    4638    public static void createJOSMFixture() {
    4739        JOSMFixture.createPerformanceTestFixture().init(true);
     
    5345     */
    5446    @Test
    55     public void testCompressed() throws Exception {
     47    void testCompressed() throws Exception {
    5648        runTest("compressed (.osm.bz2)", false);
    5749    }
     
    6254     */
    6355    @Test
    64     public void testPlain() throws Exception {
     56    void testPlain() throws Exception {
    6557        runTest(".osm-file", true);
    6658    }
Note: See TracChangeset for help on using the changeset viewer.