You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2022/02/24 11:15:44 UTC

[maven-surefire] branch SUREFIRE-2025 created (now adbbc82)

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

tibordigana pushed a change to branch SUREFIRE-2025
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.


      at adbbc82  [SUREFIRE-2025] Updated abstractions which helps associating systemProperties() with a test

This branch includes the following new commits:

     new adbbc82  [SUREFIRE-2025] Updated abstractions which helps associating systemProperties() with a test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[maven-surefire] 01/01: [SUREFIRE-2025] Updated abstractions which helps associating systemProperties() with a test

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-2025
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit adbbc82e0c0827ceafd838c21666e043ea301885
Author: tibor.digana <ti...@apache.org>
AuthorDate: Thu Feb 24 12:15:29 2022 +0100

    [SUREFIRE-2025] Updated abstractions which helps associating systemProperties() with a test
---
 .../plugin/surefire/extensions/ForkedProcessEventNotifierTest.java    | 4 ++--
 .../java/org/apache/maven/surefire/api/booter/ForkingRunListener.java | 2 +-
 .../apache/maven/surefire/api/booter/MasterProcessChannelEncoder.java | 3 ++-
 .../org/apache/maven/surefire/booter/spi/EventChannelEncoder.java     | 2 +-
 .../org/apache/maven/surefire/booter/spi/EventChannelEncoderTest.java | 2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
index f9ad00c..c4b9de7 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/extensions/ForkedProcessEventNotifierTest.java
@@ -111,7 +111,7 @@ public class ForkedProcessEventNotifierTest
             WritableBufferedByteChannel wChannel = newBufferedChannel( out );
             EventChannelEncoder encoder = new EventChannelEncoder( wChannel );
             Map<String, String> props = ObjectUtils.systemProps();
-            encoder.systemProperties( props );
+            encoder.systemProperties( props, NORMAL_RUN, 1L );
             wChannel.close();
 
             ForkedProcessEventNotifier notifier = new ForkedProcessEventNotifier();
@@ -805,7 +805,7 @@ public class ForkedProcessEventNotifierTest
             final Stream out = Stream.newStream();
             WritableBufferedByteChannel wChannel = newBufferedChannel( out );
             EventChannelEncoder encoder = new EventChannelEncoder( wChannel );
-            encoder.systemProperties( ObjectUtils.systemProps() );
+            encoder.systemProperties( ObjectUtils.systemProps(), NORMAL_RUN, 1L );
             wChannel.close();
 
             ReadableByteChannel channel = newChannel( new ByteArrayInputStream( out.toByteArray() ) );
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/ForkingRunListener.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/ForkingRunListener.java
index a67643a..dbb3156 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/ForkingRunListener.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/ForkingRunListener.java
@@ -68,7 +68,7 @@ public class ForkingRunListener
     @Override
     public void testSetCompleted( TestSetReportEntry report )
     {
-        target.systemProperties( report.getSystemProperties() );
+        target.systemProperties( report.getSystemProperties(), null, null );
         target.testSetCompleted( report, trim );
     }
 
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/MasterProcessChannelEncoder.java b/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/MasterProcessChannelEncoder.java
index 231bb46..c2c4886 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/MasterProcessChannelEncoder.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/api/booter/MasterProcessChannelEncoder.java
@@ -20,6 +20,7 @@ package org.apache.maven.surefire.api.booter;
  */
 
 import org.apache.maven.surefire.api.report.ReportEntry;
+import org.apache.maven.surefire.api.report.RunMode;
 import org.apache.maven.surefire.api.report.StackTraceWriter;
 import org.apache.maven.surefire.api.report.TestOutputReportEntry;
 
@@ -37,7 +38,7 @@ public interface MasterProcessChannelEncoder
 
     void onJvmExit();
 
-    void systemProperties( Map<String, String> sysProps );
+    void systemProperties( Map<String, String> sysProps, RunMode runMode, Long testRunId );
 
     void testSetStarting( ReportEntry reportEntry, boolean trimStackTraces );
 
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/EventChannelEncoder.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/EventChannelEncoder.java
index 3fd4573..67fd6bf 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/EventChannelEncoder.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/EventChannelEncoder.java
@@ -128,7 +128,7 @@ public class EventChannelEncoder extends EventEncoder implements MasterProcessCh
     }
 
     @Override
-    public void systemProperties( Map<String, String> sysProps )
+    public void systemProperties( Map<String, String> sysProps, RunMode rm, Long testRunId )
     {
         CharsetEncoder encoder = newCharsetEncoder();
         ByteBuffer result = null;
diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/EventChannelEncoderTest.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/EventChannelEncoderTest.java
index 7699d8c..14f1e5e 100644
--- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/EventChannelEncoderTest.java
+++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/spi/EventChannelEncoderTest.java
@@ -1151,7 +1151,7 @@ public class EventChannelEncoderTest
         EventChannelEncoder encoder = new EventChannelEncoder( channel );
 
         Map<String, String> sysProps = ObjectUtils.systemProps();
-        encoder.systemProperties( sysProps );
+        encoder.systemProperties( sysProps, NORMAL_RUN, 1L );
         channel.close();
 
         for ( Entry<String, String> entry : sysProps.entrySet() )