Changeset 17275 in josm for trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java
- Timestamp:
- 2020-10-28T20:41:00+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java
r16913 r17275 2 2 package org.openstreetmap.josm.io; 3 3 4 import static org.junit. Assert.assertNotNull;4 import static org.junit.jupiter.api.Assertions.assertNotNull; 5 5 6 6 import java.io.ByteArrayInputStream; … … 10 10 import java.io.IOException; 11 11 import java.io.InputStream; 12 import java.util.concurrent.TimeUnit; 12 13 13 import org.junit.BeforeClass; 14 import org.junit.Rule; 15 import org.junit.Test; 16 import org.junit.rules.Timeout; 14 import org.junit.jupiter.api.BeforeAll; 15 import org.junit.jupiter.api.Test; 16 import org.junit.jupiter.api.Timeout; 17 17 import org.openstreetmap.josm.JOSMFixture; 18 18 import org.openstreetmap.josm.PerformanceTestUtils; 19 19 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer; 20 20 import org.openstreetmap.josm.data.osm.DataSet; 21 22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;23 21 24 22 /** … … 29 27 * @author Michael Zangl 30 28 */ 31 public class OsmReaderPerformanceTest { 29 @Timeout(value = 15*60, unit = TimeUnit.SECONDS) 30 class OsmReaderPerformanceTest { 32 31 private static final int TIMES = 4; 33 32 private static final String DATA_FILE = "nodist/data/neubrandenburg.osm.bz2"; 34 33 35 34 /** 36 * Global timeout applied to all test methods.37 */38 @Rule39 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")40 public Timeout globalTimeout = Timeout.seconds(15*60);41 42 /**43 35 * Prepare the test. 44 36 */ 45 @Before Class37 @BeforeAll 46 38 public static void createJOSMFixture() { 47 39 JOSMFixture.createPerformanceTestFixture().init(true); … … 53 45 */ 54 46 @Test 55 publicvoid testCompressed() throws Exception {47 void testCompressed() throws Exception { 56 48 runTest("compressed (.osm.bz2)", false); 57 49 } … … 62 54 */ 63 55 @Test 64 publicvoid testPlain() throws Exception {56 void testPlain() throws Exception { 65 57 runTest(".osm-file", true); 66 58 }
Note:
See TracChangeset
for help on using the changeset viewer.