You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/01 00:20:43 UTC

[GitHub] [maven-surefire] Tibor17 opened a new pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Tibor17 opened a new pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422


   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SUREFIRE) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `SUREFIRE-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [ ] You have run the integration tests successfully (`mvn -Prun-its clean install`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777108931



##########
File path: surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java
##########
@@ -22,15 +22,19 @@
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
+import org.apache.maven.surefire.api.testset.TestSetFailedException;
 import org.apache.maven.surefire.common.junit3.JUnit3Reflector;
 import org.apache.maven.surefire.api.report.ReportEntry;
 import org.apache.maven.surefire.api.report.RunListener;
 import org.apache.maven.surefire.api.report.RunMode;
 import org.apache.maven.surefire.api.report.TestSetReportEntry;
+import org.apache.maven.surefire.shared.lang3.JavaVersion;

Review comment:
       In test classes we can use direct comons - not shaded

##########
File path: surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java
##########
@@ -54,6 +58,32 @@ public void testExecuteSuiteClass()
                       succeededTests.get( 0 ).getName() );
     }
 
+    public void testSystemManager()
+    {
+        float javaVersion = Float.parseFloat( JavaVersion.JAVA_RECENT.toString() );
+        boolean isDeprecated = javaVersion >= 17;
+        try
+        {
+            JUnit3Provider.setSystemManager( "java.lang.SecurityManager" );
+
+            if ( isDeprecated )
+            {
+                fail();
+            }
+
+            Object sm = invokeGetter( System.class, null, "getSecurityManager" );

Review comment:
       System.getSecurityManager() is public ... why  by reflections 

##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java
##########
@@ -44,4 +46,11 @@ private ObjectUtils()
     {
         return ManagementFactory.getRuntimeMXBean().getSystemProperties();
     }
+
+    public static boolean isSecurityManagerSupported()
+    {
+        ClassLoader classLoader = ObjectUtils.class.getClassLoader();
+        Class<?> smClass = tryLoadClass( classLoader, "java.lang.SecurityManager" );
+        return smClass != null && !smClass.isAnnotationPresent( Deprecated.class );
+    }

Review comment:
       Is checking java version >= 17 not enough?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003637159


   @slawekjaranowski
   One of our colleagues told me that the Github CI reserves 14GB of disk space. Maybe the problem is that we execute 20 parallel builds. We should try to avoid the duplicates (push, pull_request) which makes 1.4GB per each run configuration. I would propose to additionally overriding the Java version with min and max, means 8 and 17 only, if 10 parallel builds still does not help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777121785



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       The commit message is `investigating`. The commit does not mean anything for this Jira issue. We are discussing the timeout in the Slack/INFRA channel and I need to get the archive of `surefire-its/target` with all the dump files and logs. This was happening one year ago and I came over this issue by splitting the test set in two. Currently I am waiting for the build to complete and I hope the archive files would appear in the attachment. Then I want to go inside and analyse the logs and test content.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r788127548



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       @slawekjaranowski
   This change does not exit in this branch any longer.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 merged pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 merged pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777115790



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       Don't do it in this way
   it is step backward




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003593211


   This investigation has helped me.
   
   It looks like the GH build runs out of disk space.
   I made a [ZIP of the largest sub-module](https://github.com/apache/maven-surefire/actions/runs/1643753265) and its target folder occupies 1.2GB and I deleted binary files. So the real consumption of the disk space must be much bigger.
   The problem is that the ZIP does not contain the logs of the last 40 integration test however they were executed but their files are no more on the disk! Still we are somewhere in the middle of the entire test set.
   How can we prove my hypothesis other way that the particular build runs out of disk space?
   
   It looks like one build crashed but the other did not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777113282



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java
##########
@@ -44,4 +46,11 @@ private ObjectUtils()
     {
         return ManagementFactory.getRuntimeMXBean().getSystemProperties();
     }
+
+    public static boolean isSecurityManagerSupported()
+    {
+        ClassLoader classLoader = ObjectUtils.class.getClassLoader();
+        Class<?> smClass = tryLoadClass( classLoader, "java.lang.SecurityManager" );
+        return smClass != null && !smClass.isAnnotationPresent( Deprecated.class );
+    }

Review comment:
       what about Java Version from commons lang3 is is accessible by `org.apache.maven.surefire.shared.lang3.JavaVersion`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r788126157



##########
File path: surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java
##########
@@ -54,6 +58,32 @@ public void testExecuteSuiteClass()
                       succeededTests.get( 0 ).getName() );
     }
 
+    public void testSystemManager()
+    {
+        float javaVersion = Float.parseFloat( JavaVersion.JAVA_RECENT.toString() );
+        boolean isDeprecated = javaVersion >= 17;
+        try
+        {
+            JUnit3Provider.setSystemManager( "java.lang.SecurityManager" );
+
+            if ( isDeprecated )
+            {
+                fail();
+            }
+
+            Object sm = invokeGetter( System.class, null, "getSecurityManager" );

Review comment:
       @slawekjaranowski
   SecurityManager can be deleted in any major version.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r788128773



##########
File path: surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java
##########
@@ -22,15 +22,19 @@
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
+import org.apache.maven.surefire.api.testset.TestSetFailedException;
 import org.apache.maven.surefire.common.junit3.JUnit3Reflector;
 import org.apache.maven.surefire.api.report.ReportEntry;
 import org.apache.maven.surefire.api.report.RunListener;
 import org.apache.maven.surefire.api.report.RunMode;
 import org.apache.maven.surefire.api.report.TestSetReportEntry;
+import org.apache.maven.surefire.shared.lang3.JavaVersion;

Review comment:
       @slawekjaranowski
   It has certain purpose.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777115453



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -25,9 +25,29 @@ on:
 
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin, zulu]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+    steps:
+    - name: Verify
+      uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1

Review comment:
       it is shared workflow ... can not be uses as step




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003571346


   This CI script will publish archived artifacts for further analysis. We need to find out why the JVM exists after one hour of execution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777122090



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       @slawekjaranowski
   The build runs every configuration twice, means `push` and `pull_request`. This is the waste and I also could not avoid it in my scripts. Do you know how to do it? This would save the h/w resources in favor of others.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003593211


   This investigating has helped me.
   
   It looks like the GH build runs out of disk space.
   I made a ZIP of the largest sub-module and its target folder occupies 1.2GB and I deleted binary files. So the real consumption of the disk space must be much bigger.
   The problem is that the ZIP does not contain the logs of the last 40 integration test however they were executed but their files are no more on the disk! Still we are somewhere in the middle of the entire test set.
   How can we prove my hypothesis other way that the particular build runs out of disk space?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777124494



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       That is because we have two events:
   - push to branches
   - pull_request 
   
   I try to discover how prevent it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777124681



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       by the way attached artifacts has size > 1GB ...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003637159


   @slawekjaranowski
   One of our colleagues told me that the Github CI reserves 14GB of disk space. Maybe the problem is that we execute 20 parallel builds. We should try to avoid the duplicates (push, pull_request) which makes 1.4GB. I would propose to additionally overriding the Java version with min and max, means 8 and 17 only, if 10 parallel builds still does not help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r788126157



##########
File path: surefire-providers/surefire-junit3/src/test/java/org/apache/maven/surefire/junit/JUnitTestSetTest.java
##########
@@ -54,6 +58,32 @@ public void testExecuteSuiteClass()
                       succeededTests.get( 0 ).getName() );
     }
 
+    public void testSystemManager()
+    {
+        float javaVersion = Float.parseFloat( JavaVersion.JAVA_RECENT.toString() );
+        boolean isDeprecated = javaVersion >= 17;
+        try
+        {
+            JUnit3Provider.setSystemManager( "java.lang.SecurityManager" );
+
+            if ( isDeprecated )
+            {
+                fail();
+            }
+
+            Object sm = invokeGetter( System.class, null, "getSecurityManager" );

Review comment:
       @slawekjaranowski
   SecurityManager can be deleted in any major version.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r788126504



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java
##########
@@ -44,4 +46,11 @@ private ObjectUtils()
     {
         return ManagementFactory.getRuntimeMXBean().getSystemProperties();
     }
+
+    public static boolean isSecurityManagerSupported()
+    {
+        ClassLoader classLoader = ObjectUtils.class.getClassLoader();
+        Class<?> smClass = tryLoadClass( classLoader, "java.lang.SecurityManager" );
+        return smClass != null && !smClass.isAnnotationPresent( Deprecated.class );
+    }

Review comment:
       @slawekjaranowski
   Now JavaVersion is in use!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003593211


   This investigation has helped me.
   
   It looks like the GH build runs out of disk space.
   I made a [ZIP of the largest sub-module](https://github.com/apache/maven-surefire/actions/runs/1643753265) and its target folder occupies 1.2GB and I deleted binary files. So the real consumption of the disk space must be much bigger.
   The problem is that the ZIP does not contain the logs of the last 40 integration test however they were executed but their files are no more on the disk! Still we are somewhere in the middle of the entire test set.
   How can we prove my hypothesis other way that the particular build runs out of disk space?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#issuecomment-1003593211


   This investigation has helped me.
   
   It looks like the GH build runs out of disk space.
   I made a ZIP of the largest sub-module and its target folder occupies 1.2GB and I deleted binary files. So the real consumption of the disk space must be much bigger.
   The problem is that the ZIP does not contain the logs of the last 40 integration test however they were executed but their files are no more on the disk! Still we are somewhere in the middle of the entire test set.
   How can we prove my hypothesis other way that the particular build runs out of disk space?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777110752



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java
##########
@@ -44,4 +46,11 @@ private ObjectUtils()
     {
         return ManagementFactory.getRuntimeMXBean().getSystemProperties();
     }
+
+    public static boolean isSecurityManagerSupported()
+    {
+        ClassLoader classLoader = ObjectUtils.class.getClassLoader();
+        Class<?> smClass = tryLoadClass( classLoader, "java.lang.SecurityManager" );
+        return smClass != null && !smClass.isAnnotationPresent( Deprecated.class );
+    }

Review comment:
       It was my previous solution but the class appears in module surefire-booter. This is surefire-api, so we cannot inherit it and cannot duplicate the code.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777115536



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -25,9 +25,29 @@ on:
 
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin, zulu]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+    steps:
+    - name: Verify
+      uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1

Review comment:
       We can extend  this workflow with artifacts upload support




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777121785



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -15,19 +15,49 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Verify
+name: GitHub CI
 
 on:
   push:
     branches-ignore:
       - dependabot/**
   pull_request:
 
+
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v1
+
+      - name: Set up JDK ${{ matrix.java }}
+        uses: actions/setup-java@v2.4.0
+        with:
+          distribution: ${{ matrix.jdk }}
+          java-version: ${{ matrix.java }}
+          cache: 'maven'
+
+      - name: Build with Maven
+        run: mvn clean install -e -B -V -nsu --no-transfer-progress -P run-its -Dfailsafe-integration-test-port=8083
+
+      - name: Upload artifact surefire-its
+        uses: actions/upload-artifact@v2-preview
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-surefire-its
+          path: |
+            surefire-its/target/*/log.txt
+            surefire-its/target/**/surefire-reports/*
+            surefire-its/target/**/failsafe-reports/*
+            !surefire-its/target/failsafe-reports

Review comment:
       The commit message is `investigating`. The commit does not mean anything for this Jira issue. We are discussing the timeout in the Slack/INFRA channel and I need to get the archive of `surefire-its/target` with all the dump files and logs. This was happening one year ago and I came over this problem by splitting the test set in two. Currently I am waiting for the build to complete and I hope the archive files would appear in the attachment. Then I want to go inside and analyse the logs and test content.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #422: [SUREFIRE-1975] JDK18 - The Security Manager is deprecated and will be removed in a future release

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r788127170



##########
File path: .github/workflows/maven-verify.yml
##########
@@ -25,9 +25,29 @@ on:
 
 jobs:
   build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
-    with:
-      ff-goal: 'install'
-      verify-goal: 'install -P run-its'
-      verify-fail-fast: false
+    strategy:
+      matrix:
+        os: [ubuntu-latest, windows-latest, macOS-latest]
+        java: [8, 11, 17]
+        jdk: [temurin, zulu]
+      fail-fast: false
+
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 120
+    steps:
+    - name: Verify
+      uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1

Review comment:
       @slawekjaranowski
   This change does not exit in this branch any longer.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org