This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 462b65d123a45f5c3b817fd35a61b759726b8a38
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Tue Feb 20 16:17:49 2024 +0100

    Enable more parallel execution of tests.
---
 .../test/org/apache/sis/util/iso/DefaultRecordTest.java        |  3 +++
 .../test/org/apache/sis/io/wkt/ComparisonWithEPSG.java         |  3 +++
 .../test/org/apache/sis/parameter/ParameterFormatTest.java     |  3 +++
 .../apache/sis/referencing/factory/sql/EPSGFactoryTest.java    |  3 +++
 incubator/build.gradle.kts                                     |  3 +++
 .../test/org/apache/sis/map/SEPortrayerTest.java               |  5 +++++
 .../test/org/apache/sis/map/service/GraphicsPortrayerTest.java | 10 ++++++++--
 optional/build.gradle.kts                                      |  3 +++
 8 files changed, 31 insertions(+), 2 deletions(-)

diff --git 
a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/util/iso/DefaultRecordTest.java
 
b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/util/iso/DefaultRecordTest.java
index 575f7c0a39..0333f62b55 100644
--- 
a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/util/iso/DefaultRecordTest.java
+++ 
b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/util/iso/DefaultRecordTest.java
@@ -25,6 +25,8 @@ import org.opengis.util.RecordType;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
 import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 import org.apache.sis.test.TestCase;
 import static org.apache.sis.test.Assertions.assertMessageContains;
 import static org.apache.sis.test.Assertions.assertMultilinesEquals;
@@ -35,6 +37,7 @@ import static 
org.apache.sis.test.Assertions.assertMultilinesEquals;
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
+@Execution(ExecutionMode.CONCURRENT)
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public final class DefaultRecordTest extends TestCase {
     /**
diff --git 
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/ComparisonWithEPSG.java
 
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/ComparisonWithEPSG.java
index 1a867e7108..736925ca7c 100644
--- 
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/ComparisonWithEPSG.java
+++ 
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/io/wkt/ComparisonWithEPSG.java
@@ -28,6 +28,8 @@ import org.apache.sis.referencing.factory.sql.EPSGFactory;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 import static org.apache.sis.test.Assertions.assertEqualsIgnoreMetadata;
 import org.apache.sis.test.TestCase;
 
@@ -37,6 +39,7 @@ import org.apache.sis.test.TestCase;
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
+@Execution(ExecutionMode.CONCURRENT)
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public final class ComparisonWithEPSG extends TestCase {
     /**
diff --git 
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/parameter/ParameterFormatTest.java
 
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/parameter/ParameterFormatTest.java
index 6715660dc8..32123058d2 100644
--- 
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/parameter/ParameterFormatTest.java
+++ 
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/parameter/ParameterFormatTest.java
@@ -32,6 +32,8 @@ import static 
org.apache.sis.metadata.iso.citation.Citations.EPSG;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
 import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 import org.apache.sis.test.TestCase;
 import static org.apache.sis.test.Assertions.assertMultilinesEquals;
 
@@ -41,6 +43,7 @@ import static 
org.apache.sis.test.Assertions.assertMultilinesEquals;
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
+@Execution(ExecutionMode.CONCURRENT)
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public final class ParameterFormatTest extends TestCase {
     /**
diff --git 
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java
 
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java
index eedc715278..2612992e7b 100644
--- 
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java
+++ 
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java
@@ -61,6 +61,8 @@ import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.AfterAll;
 import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 import org.apache.sis.test.TestCaseWithLogs;
 import org.apache.sis.referencing.factory.TestFactorySource;
 import static org.apache.sis.test.Assertions.assertNotDeepEquals;
@@ -77,6 +79,7 @@ import static 
org.opengis.test.Assertions.assertAxisDirectionsEqual;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Vadim Semenov
  */
+@Execution(ExecutionMode.SAME_THREAD)
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public final class EPSGFactoryTest extends TestCaseWithLogs {
     /**
diff --git a/incubator/build.gradle.kts b/incubator/build.gradle.kts
index 157103840f..214aeeaf21 100644
--- a/incubator/build.gradle.kts
+++ b/incubator/build.gradle.kts
@@ -141,6 +141,9 @@ tasks.test {
         events("FAILED", "STANDARD_OUT", "STANDARD_ERROR")
         setExceptionFormat("FULL")
     }
+    systemProperty("junit.jupiter.execution.parallel.enabled", "true")
+    systemProperty("junit.jupiter.execution.parallel.mode.default", 
"concurrent")
+    systemProperty("junit.jupiter.execution.parallel.mode.classes.default", 
"concurrent")
 }
 
 /*
diff --git 
a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/SEPortrayerTest.java
 
b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/SEPortrayerTest.java
index f3e9ef9f59..b9558b8796 100644
--- 
a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/SEPortrayerTest.java
+++ 
b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/SEPortrayerTest.java
@@ -67,12 +67,17 @@ import org.apache.sis.util.iso.Names;
 // Test dependencies
 import org.junit.jupiter.api.Test;
 import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 
 
 /**
  *
  * @author Johann Sorel (Geomatys)
  */
+@Execution(ExecutionMode.CONCURRENT)
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public class SEPortrayerTest {
     /**
      * The factory to use for creating style elements.
diff --git 
a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
 
b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
index 283553bb72..975d8908cc 100644
--- 
a/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
+++ 
b/incubator/src/org.apache.sis.portrayal.map/test/org/apache/sis/map/service/GraphicsPortrayerTest.java
@@ -47,19 +47,25 @@ import org.apache.sis.style.se1.Symbology;
 // Test dependencies
 import static org.junit.jupiter.api.Assertions.*;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
 
 
 /**
  *
  * @author Johann Sorel (Geomatys)
  */
+@Execution(ExecutionMode.CONCURRENT)
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public class GraphicsPortrayerTest {
 
-    private static final GridGeometry WORLD = new GridGeometry(
+    private final GridGeometry WORLD = new GridGeometry(
             new GridExtent(360, 180),
             CRS.getDomainOfValidity(CommonCRS.WGS84.normalizedGeographic()),
             GridOrientation.REFLECTION_Y);
-    private static final GeometryFactory GF = new GeometryFactory();
+
+    private final GeometryFactory GF = new GeometryFactory();
 
     /**
      * Creates a new test case.
diff --git a/optional/build.gradle.kts b/optional/build.gradle.kts
index 9d3b5aa332..3f3e90f4eb 100644
--- a/optional/build.gradle.kts
+++ b/optional/build.gradle.kts
@@ -143,6 +143,9 @@ tasks.test {
         events("FAILED", "STANDARD_OUT", "STANDARD_ERROR")
         setExceptionFormat("FULL")
     }
+    systemProperty("junit.jupiter.execution.parallel.enabled", "true")
+    systemProperty("junit.jupiter.execution.parallel.mode.default", 
"concurrent")
+    systemProperty("junit.jupiter.execution.parallel.mode.classes.default", 
"concurrent")
 }
 
 /*

Reply via email to