Changeset 9458 in josm for trunk


Ignore:
Timestamp:
2016-01-15T02:11:39+01:00 (9 years ago)
Author:
Don-vip
Message:

timeouts for unit/performance tests

Location:
trunk/test
Files:
7 edited

Legend:

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

    r8632 r9458  
    1111import org.junit.Before;
    1212import org.junit.BeforeClass;
     13import org.junit.Rule;
    1314import org.junit.Test;
     15import org.junit.rules.Timeout;
    1416import org.openstreetmap.josm.JOSMFixture;
    1517import org.openstreetmap.josm.PerformanceTestUtils;
     
    3133
    3234    /**
     35     * Global timeout applied to all test methods.
     36     */
     37    @Rule
     38    public Timeout globalTimeout = Timeout.seconds(15*60);
     39
     40    /**
    3341     * Prepare the test.
    3442     */
  • trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java

    r8510 r9458  
    99
    1010import org.junit.BeforeClass;
     11import org.junit.Rule;
    1112import org.junit.Test;
     13import org.junit.rules.Timeout;
    1214import org.openstreetmap.josm.JOSMFixture;
    1315import org.openstreetmap.josm.data.Bounds;
     
    3032    private static DataSet dsMultipolygon;
    3133    private static DataSet dsCity;
     34
     35    /**
     36     * Global timeout applied to all test methods.
     37     */
     38    @Rule
     39    public Timeout globalTimeout = Timeout.seconds(15*60);
    3240
    3341    @BeforeClass
  • trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java

    r8836 r9458  
    33
    44import org.junit.BeforeClass;
     5import org.junit.Rule;
    56import org.junit.Test;
     7import org.junit.rules.Timeout;
    68import org.openstreetmap.josm.JOSMFixture;
    79import org.openstreetmap.josm.PerformanceTestUtils;
     
    7880
    7981    /**
     82     * Global timeout applied to all test methods.
     83     */
     84    @Rule
     85    public Timeout globalTimeout = Timeout.seconds(15*60);
     86
     87    /**
    8088     * Prepare the test.
    8189     */
     
    142150        timer.done();
    143151    }
    144 
    145152}
  • trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java

    r9457 r9458  
    1111
    1212import org.junit.BeforeClass;
     13import org.junit.Rule;
    1314import org.junit.Test;
     15import org.junit.rules.Timeout;
    1416import org.openstreetmap.josm.JOSMFixture;
    1517import org.openstreetmap.josm.PerformanceTestUtils;
     
    2931    private static final int TIMES = 4;
    3032    private static String DATA_FILE = "data_nodist/neubrandenburg.osm.bz2";
     33
     34    /**
     35     * Global timeout applied to all test methods.
     36     */
     37    @Rule
     38    public Timeout globalTimeout = Timeout.seconds(15*60);
    3139
    3240    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java

    r9400 r9458  
    1111
    1212import org.junit.BeforeClass;
     13import org.junit.Rule;
    1314import org.junit.Test;
     15import org.junit.rules.Timeout;
    1416import org.openstreetmap.josm.JOSMFixture;
    1517import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
     
    3032
    3133    /**
     34     * Global timeout applied to all test methods.
     35     */
     36    @Rule
     37    public Timeout globalTimeout = Timeout.seconds(10*60);
     38
     39    /**
    3240     * Setup test.
    3341     */
     
    4250     * @throws ParseException if the config file does not match MapCSS syntax
    4351     */
    44     @Test(timeout = 10*60*1000)
     52    @Test
    4553    public void testValidityOfAvailableStyles() throws ParseException, IOException {
    4654        Collection<ExtendedSourceEntry> sources = new MapPaintPreference.MapPaintSourceEditor()
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java

    r9166 r9458  
    1212
    1313import org.junit.BeforeClass;
     14import org.junit.Rule;
    1415import org.junit.Test;
     16import org.junit.rules.Timeout;
    1517import org.openstreetmap.josm.JOSMFixture;
    1618import org.openstreetmap.josm.Main;
     
    2628
    2729    /**
     30     * Global timeout applied to all test methods.
     31     */
     32    @Rule
     33    public Timeout globalTimeout = Timeout.seconds(10*60);
     34
     35    /**
    2836     * Setup test.
    2937     */
     
    3644     * Test that available tagging presets are valid.
    3745     */
    38     @Test(timeout = 10*60*1000)
     46    @Test
    3947    public void testValidityOfAvailablePresets() {
    4048        Collection<ExtendedSourceEntry> sources = new TaggingPresetPreference.TaggingPresetSourceEditor()
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java

    r9429 r9458  
    1212
    1313import org.junit.BeforeClass;
     14import org.junit.Rule;
    1415import org.junit.Test;
     16import org.junit.rules.Timeout;
    1517import org.openstreetmap.josm.JOSMFixture;
    1618import org.openstreetmap.josm.Main;
     
    2123 */
    2224public class PluginHandlerTest {
     25
     26    /**
     27     * Global timeout applied to all test methods.
     28     */
     29    @Rule
     30    public Timeout globalTimeout = Timeout.seconds(10*60);
    2331
    2432    /**
     
    3341     * Test that available plugins rules can be loaded.
    3442     */
    35     @Test(timeout = 10*60*1000)
     43    @Test
    3644    public void testValidityOfAvailablePlugins() {
    3745        // Download complete list of plugins
Note: See TracChangeset for help on using the changeset viewer.