Ignore:
Timestamp:
2023-10-04T00:03:40+02:00 (19 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/audio/AudioPlayerTest.java

    r17275 r18853  
    33
    44import static org.junit.jupiter.api.Assertions.assertFalse;
     5import static org.junit.jupiter.api.Assertions.assertTimeout;
    56import static org.junit.jupiter.api.Assertions.assertTrue;
    6 import static org.junit.jupiter.api.Assertions.assertTimeout;
    77
    88import java.io.File;
    9 import java.net.MalformedURLException;
    109import java.net.URL;
    1110import java.time.Duration;
    1211
    13 import org.junit.jupiter.api.BeforeAll;
    1412import org.junit.jupiter.api.Disabled;
    1513import org.junit.jupiter.api.Test;
    16 import org.openstreetmap.josm.JOSMFixture;
    1714import org.openstreetmap.josm.TestUtils;
    1815import org.openstreetmap.josm.tools.Stopwatch;
     
    2825
    2926    /**
    30      * Setup test.
    31      */
    32     @BeforeAll
    33     public static void setUp() {
    34         JOSMFixture.createUnitTestFixture().init();
    35     }
    36 
    37     /**
    3827     * Test method for {@code AudioPlayer#play(URL)}
    39      * @throws Exception audio fault exception, e.g. can't open stream, unhandleable audio format
    40      * @throws MalformedURLException wrong URL
    4128     */
    4229    @Test
    43     void testPlay() throws MalformedURLException, Exception {
     30    void testPlay() {
    4431        assertTimeout(Duration.ofMillis(4*MAX_DURATION), () -> {
    4532            File wav1 = new File(TestUtils.getRegressionDataFile(6851, "20111003_121226.wav"));
Note: See TracChangeset for help on using the changeset viewer.