Ticket #20433: 20433.patch

File 20433.patch, 1.9 KB (added by taylor.smock, 5 years ago)

Enable parallel test execution and annotate ImageryPreferenceTestIT#testImageryEntryValidity with @Execution(ExecutionMode.CONCURRENT)

  • build.xml

     
    444444                            <jvmarg value="-Dfile.encoding=UTF-8"/>
    445445                            <jvmarg value="-javaagent:${test.dir}/lib/jmockit.jar"/>
    446446                            <jvmarg value="-Djunit.jupiter.extensions.autodetection.enabled=true"/>
     447                            <jvmarg value="-Djunit.jupiter.execution.parallel.enabled=true"/>
    447448                            <jvmarg value="--add-modules" if:set="isJava9" unless:set="isJava11" />
    448449                            <jvmarg value="java.activation,java.se.ee" if:set="isJava9" unless:set="isJava11" />
    449450                            <jvmarg value="--add-exports" if:set="isJava9" unless:set="noJavaFX" />
  • test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

     
    2929import org.junit.jupiter.api.AfterAll;
    3030import org.junit.jupiter.api.BeforeAll;
    3131import org.junit.jupiter.api.extension.RegisterExtension;
     32import org.junit.jupiter.api.parallel.Execution;
     33import org.junit.jupiter.api.parallel.ExecutionMode;
    3234import org.junit.jupiter.params.ParameterizedTest;
    3335import org.junit.jupiter.params.provider.Arguments;
    3436import org.junit.jupiter.params.provider.MethodSource;
     
    425427     * @param id The id of the imagery info to show as the test name
    426428     * @param info The imagery info to test
    427429     */
     430    @Execution(ExecutionMode.CONCURRENT)
    428431    @ParameterizedTest(name = "{0}")
    429432    @MethodSource("data")
    430433    void testImageryEntryValidity(String id, ImageryInfo info) {