Changeset 14235 in josm for trunk


Ignore:
Timestamp:
2018-09-09T20:10:25+02:00 (10 months ago)
Author:
Don-vip
Message:

make sure https is properly initialized for integration tests

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java

    r12620 r14235  
    4747import java.util.regex.Pattern;
    4848
     49import org.junit.Rule;
    4950import org.junit.Test;
     51import org.openstreetmap.josm.testutils.JOSMTestRules;
    5052import org.openstreetmap.josm.tools.Logging;
    5153
     
    5860 */
    5961public class DomainValidatorTestIT {
     62
     63    /**
     64     * Setup rule
     65     */
     66    @Rule
     67    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     68    public JOSMTestRules test = new JOSMTestRules().https();
    6069
    6170    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTestIT.java

    r14142 r14235  
    2222    @Rule
    2323    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules().projection();
     24    public JOSMTestRules test = new JOSMTestRules().https().projection();
    2525
    2626    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java

    r14201 r14235  
    99import java.util.Map;
    1010
    11 import org.junit.BeforeClass;
    1211import org.junit.Rule;
    1312import org.junit.Test;
    14 import org.junit.rules.Timeout;
    15 import org.openstreetmap.josm.JOSMFixture;
    1613import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
    1714import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
     
    2320import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
    2421import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
     22import org.openstreetmap.josm.testutils.JOSMTestRules;
    2523import org.openstreetmap.josm.tools.ImageProvider;
    2624
     
    3331
    3432    /**
    35      * Global timeout applied to all test methods.
     33     * Setup rule
    3634     */
    3735    @Rule
    3836    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public Timeout globalTimeout = Timeout.seconds(15*60);
    40 
    41     /**
    42      * Setup test.
    43      */
    44     @BeforeClass
    45     public static void setUpBeforeClass() {
    46         JOSMFixture.createUnitTestFixture().init();
    47     }
     37    public JOSMTestRules test = new JOSMTestRules().https().timeout(15000*60);
    4838
    4939    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java

    r12849 r14235  
    1212import java.util.Set;
    1313
    14 import org.junit.BeforeClass;
    1514import org.junit.Rule;
    1615import org.junit.Test;
    17 import org.junit.rules.Timeout;
    18 import org.openstreetmap.josm.JOSMFixture;
    1916import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
    2017import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;
    2118import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader;
    2219import org.openstreetmap.josm.spi.preferences.Config;
     20import org.openstreetmap.josm.testutils.JOSMTestRules;
    2321import org.openstreetmap.josm.tools.ImageProvider;
    2422import org.openstreetmap.josm.tools.Logging;
     
    3331
    3432    /**
    35      * Global timeout applied to all test methods.
     33     * Setup rule
    3634     */
    3735    @Rule
    3836    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public Timeout globalTimeout = Timeout.seconds(10*60);
    40 
    41     /**
    42      * Setup test.
    43      */
    44     @BeforeClass
    45     public static void setUpBeforeClass() {
    46         JOSMFixture.createUnitTestFixture().init();
    47     }
     37    public JOSMTestRules test = new JOSMTestRules().https().timeout(10000*60);
    4838
    4939    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java

    r12649 r14235  
    99import java.util.Collection;
    1010
    11 import org.junit.BeforeClass;
     11import org.junit.Rule;
    1212import org.junit.Test;
    13 import org.openstreetmap.josm.JOSMFixture;
    1413import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
    1514import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
    1615import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.ParseResult;
     16import org.openstreetmap.josm.testutils.JOSMTestRules;
     17
     18import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1719
    1820/**
     
    2224
    2325    /**
    24      * Setup test.
     26     * Setup rule
    2527     */
    26     @BeforeClass
    27     public static void setUpBeforeClass() {
    28         JOSMFixture.createUnitTestFixture().init();
    29     }
     28    @Rule
     29    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     30    public JOSMTestRules test = new JOSMTestRules().https();
    3031
    3132    /**
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r14149 r14235  
    4242    @Rule
    4343    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    44     public JOSMTestRules test = new JOSMTestRules().main().projection().preferences().timeout(10*60*1000);
     44    public JOSMTestRules test = new JOSMTestRules().main().projection().preferences().https().timeout(10*60*1000);
    4545
    4646    /**
Note: See TracChangeset for help on using the changeset viewer.