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 2018/12/15 12:39:48 UTC

[maven-surefire] branch SUREFIRE-1017 updated (f72a0e7 -> 820f950)

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

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


 discard f72a0e7  added JDK 12 (Ubuntu) on Jenkins CI
 discard 8b948be  README.md
 discard df64ff2  added more unit tests in SmartStackTraceParserTest and refactoring
     add f517d34  [SUREFIRE-1614] JUnit Runner that writes to System.out corrupts Surefire's STDOUT when using JUnit's Vintage Engine
     new faa473d  added more unit tests in SmartStackTraceParserTest and refactoring
     new 8cef8fe  README.md
     new 820f950  added JDK 12 (Ubuntu) on Jenkins CI

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f72a0e7)
            \
             N -- N -- N   refs/heads/SUREFIRE-1017 (820f950)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 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.


Summary of changes:
 ...T.java => JUnitPlatformStreamCorruptionIT.java} | 46 +++++------------
 .../pom.xml                                        | 42 +++++++---------
 .../test/java/com/example/demo/CustomRunner.java   | 22 ++++++++
 .../example/demo/SurefireStreamCorruptionTest.java | 13 +++++
 .../junitplatform/JUnitPlatformProvider.java       | 58 +++++++++++-----------
 5 files changed, 96 insertions(+), 85 deletions(-)
 copy surefire-its/src/test/java/org/apache/maven/surefire/its/{JUnitPlatformIT.java => JUnitPlatformStreamCorruptionIT.java} (61%)
 copy surefire-its/src/test/resources/{surefire-931-provider-failure => surefire-1614-stream-corruption}/pom.xml (54%)
 create mode 100644 surefire-its/src/test/resources/surefire-1614-stream-corruption/src/test/java/com/example/demo/CustomRunner.java
 create mode 100644 surefire-its/src/test/resources/surefire-1614-stream-corruption/src/test/java/com/example/demo/SurefireStreamCorruptionTest.java


[maven-surefire] 03/03: added JDK 12 (Ubuntu) on Jenkins CI

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

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

commit 820f950972f6030e5b3d7e748a0ded4b757bfa1f
Author: Tibor17 <ti...@apache.org>
AuthorDate: Wed Dec 12 02:40:14 2018 +0100

    added JDK 12 (Ubuntu) on Jenkins CI
---
 Jenkinsfile                                                 |  6 +++++-
 .../java/org/apache/maven/surefire/its/Java9FullApiIT.java  | 13 ++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index f2d937b..5166d0f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -32,7 +32,7 @@ properties(
 
 final def oses = ['linux':'ubuntu && !H24', 'windows':'Windows']
 final def mavens = env.BRANCH_NAME == 'master' ? ['3.5.x', '3.3.x', '3.2.x'] : ['3.5.x']
-final def jdks = [11, 8, 7]
+final def jdks = [12, 11, 8, 7]
 
 final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
 final def goals = ['clean', 'install', 'jacoco:report']
@@ -62,6 +62,10 @@ oses.eachWithIndex { osMapping, indexOfOs ->
 
             stages[stageKey] = {
                 node(label) {
+                    if (os == 'windows' && jdk == 12) {
+                        // https://issues.apache.org/jira/browse/INFRA-17384
+                        return
+                    }
                     timestamps {
                         def boolean makeReports = indexOfOs == 0 && indexOfMaven == 0 && indexOfJdk == 0
                         def failsafeItPort = 8000 + 100 * indexOfMaven + 10 * indexOfJdk
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/Java9FullApiIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/Java9FullApiIT.java
index ec9a688..1ceebb0 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/Java9FullApiIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/Java9FullApiIT.java
@@ -40,6 +40,7 @@ import static org.hamcrest.Matchers.is;
 public class Java9FullApiIT
         extends AbstractJigsawIT
 {
+    private static final String JVM_SPEC_VERSION = System.getProperty( "java.specification.version" );
 
     @Test
     public void shouldLoadMultipleJavaModules_JavaHome() throws Exception
@@ -55,9 +56,7 @@ public class Java9FullApiIT
                 .verifyTextInLog( "loaded class javax.xml.bind.JAXBException" )
                 .verifyTextInLog( "loaded class javax.transaction.TransactionManager" )
                 .verifyTextInLog( "loaded class javax.transaction.InvalidTransactionException" )
-                .assertThatLogLine( anyOf( is( "java.specification.version=9" ),
-                                           is( "java.specification.version=10" ),
-                                           is( "java.specification.version=11" ) ),
+                .assertThatLogLine( is( "java.specification.version=" + JVM_SPEC_VERSION ),
                                     greaterThanOrEqualTo( 1 ) );
     }
 
@@ -76,9 +75,7 @@ public class Java9FullApiIT
                 .verifyTextInLog( "loaded class javax.xml.bind.JAXBException" )
                 .verifyTextInLog( "loaded class javax.transaction.TransactionManager" )
                 .verifyTextInLog( "loaded class javax.transaction.InvalidTransactionException" )
-                .assertThatLogLine( anyOf( is( "java.specification.version=9" ),
-                                           is( "java.specification.version=10" ),
-                                           is( "java.specification.version=11" ) ),
+                .assertThatLogLine( is( "java.specification.version=" + JVM_SPEC_VERSION ),
                                     greaterThanOrEqualTo( 1 ) );
     }
 
@@ -98,9 +95,7 @@ public class Java9FullApiIT
                 .verifyTextInLog( "loaded class javax.xml.bind.JAXBException" )
                 .verifyTextInLog( "loaded class javax.transaction.TransactionManager" )
                 .verifyTextInLog( "loaded class javax.transaction.InvalidTransactionException" )
-                .assertThatLogLine( anyOf( is( "java.specification.version=9" ),
-                                           is( "java.specification.version=10" ),
-                                           is( "java.specification.version=11" ) ),
+                .assertThatLogLine( is( "java.specification.version=" + JVM_SPEC_VERSION ),
                                     greaterThanOrEqualTo( 1 ) );
     }
 


[maven-surefire] 01/03: added more unit tests in SmartStackTraceParserTest and refactoring

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

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

commit faa473d17ef9c40c74e268c5ce9f682791225efd
Author: Tibor17 <ti...@apache.org>
AuthorDate: Wed Dec 12 00:20:00 2018 +0100

    added more unit tests in SmartStackTraceParserTest and refactoring
---
 .../surefire/report/SmartStackTraceParser.java     | 112 +++++++++------------
 .../maven/surefire/report/OutermostClass.java      |  27 +++++
 .../surefire/report/SmartStackTraceParserTest.java |  76 +++++++++-----
 3 files changed, 129 insertions(+), 86 deletions(-)

diff --git a/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java b/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java
index 6ebb2d4..6081a75 100644
--- a/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java
+++ b/surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java
@@ -20,10 +20,11 @@ package org.apache.maven.surefire.report;
  */
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
+import static java.lang.Math.min;
 import static java.util.Arrays.asList;
+import static java.util.Collections.reverse;
 import static org.apache.maven.shared.utils.StringUtils.chompLast;
 import static org.apache.maven.shared.utils.StringUtils.isNotEmpty;
 
@@ -39,35 +40,27 @@ public class SmartStackTraceParser
 
     private final StackTraceElement[] stackTrace;
 
-    private final String simpleName;
-
     private final String testClassName;
 
-    private final Class testClass;
+    private final Class<?> testClass;
 
     private final String testMethodName;
 
-    public SmartStackTraceParser( Class testClass, Throwable throwable )
-    {
-        this( testClass.getName(), throwable, null );
-    }
-
     public SmartStackTraceParser( String testClassName, Throwable throwable, String testMethodName )
     {
         this.testMethodName = testMethodName;
         this.testClassName = testClassName;
-        testClass = getClass( testClassName );
-        simpleName = testClassName.substring( testClassName.lastIndexOf( "." ) + 1 );
+        testClass = toClass( testClassName );
         this.throwable = new SafeThrowable( throwable );
         stackTrace = throwable.getStackTrace();
     }
 
-    private static Class getClass( String name )
+    private static Class<?> toClass( String name )
     {
         try
         {
             ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-            return classLoader != null ? classLoader.loadClass( name ) : null;
+            return classLoader == null ? null : classLoader.loadClass( name );
         }
         catch ( ClassNotFoundException e )
         {
@@ -75,7 +68,7 @@ public class SmartStackTraceParser
         }
     }
 
-    private static String getSimpleName( String className )
+    private static String toSimpleClassName( String className )
     {
         int i = className.lastIndexOf( "." );
         return className.substring( i + 1 );
@@ -91,10 +84,11 @@ public class SmartStackTraceParser
 
         final StringBuilder result = new StringBuilder();
         final List<StackTraceElement> stackTraceElements = focusOnClass( stackTrace, testClass );
-        Collections.reverse( stackTraceElements );
+        reverse( stackTraceElements );
+        final String testClassSimpleName = toSimpleClassName( testClassName );
         if ( stackTraceElements.isEmpty() )
         {
-            result.append( simpleName );
+            result.append( testClassSimpleName );
             if ( isNotEmpty( testMethodName ) )
             {
                 result.append( "." )
@@ -103,64 +97,62 @@ public class SmartStackTraceParser
         }
         else
         {
-            for ( int i = 0; i < stackTraceElements.size(); i++ )
+            for ( int i = 0, size = stackTraceElements.size(); i < size; i++ )
             {
                 final StackTraceElement stackTraceElement = stackTraceElements.get( i );
+                final boolean isTestClassName = stackTraceElement.getClassName().equals( testClassName );
                 if ( i == 0 )
                 {
-                    result.append( simpleName );
-                    if ( !stackTraceElement.getClassName().equals( testClassName ) )
-                    {
-                        result.append( ">" );
-                    }
-                    else
-                    {
-                        result.append( "." );
-                    }
+                    result.append( testClassSimpleName )
+                            .append( isTestClassName ? '.' : '>' );
                 }
-                if ( !stackTraceElement.getClassName().equals( testClassName ) )
+
+                if ( !isTestClassName )
                 {
-                    result.append( getSimpleName( stackTraceElement.getClassName() ) ) // Add the name of the superclas
-                        .append( "." );
+                    result.append( toSimpleClassName( stackTraceElement.getClassName() ) )
+                        .append( '.' );
                 }
+
                 result.append( stackTraceElement.getMethodName() )
-                    .append( ":" )
+                    .append( ':' )
                     .append( stackTraceElement.getLineNumber() )
                     .append( "->" );
             }
 
             if ( result.length() >= 2 )
             {
-                result.deleteCharAt( result.length() - 1 )
-                    .deleteCharAt( result.length() - 1 );
+                result.setLength( result.length() - 2 );
             }
         }
 
-        Throwable target = throwable.getTarget();
-        String exception = target.getClass().getName();
+        final Throwable target = throwable.getTarget();
+        final Class<?> excType = target.getClass();
+        final String excClassName = excType.getName();
+        final String msg = throwable.getMessage();
+
         if ( target instanceof AssertionError
-            || "junit.framework.AssertionFailedError".equals( exception )
-            || "junit.framework.ComparisonFailure".equals( exception ) )
+                || "junit.framework.AssertionFailedError".equals( excClassName )
+                || "junit.framework.ComparisonFailure".equals( excClassName ) )
         {
-            String msg = throwable.getMessage();
             if ( isNotEmpty( msg ) )
             {
-                result.append( " " )
+                result.append( ' ' )
                     .append( msg );
             }
         }
         else
         {
-            result.append( rootIsInclass() ? " " : " » " );
-            result.append( getMinimalThrowableMiniMessage( target ) );
-            result.append( getTruncatedMessage( MAX_LINE_LENGTH - result.length() ) );
+            result.append( rootIsInclass() ? " " : " » " )
+                    .append( toMinimalThrowableMiniMessage( excType ) );
+
+            result.append( truncateMessage( msg, MAX_LINE_LENGTH - result.length() ) );
         }
         return result.toString();
     }
 
-    private static String getMinimalThrowableMiniMessage( Throwable throwable )
+    private static String toMinimalThrowableMiniMessage( Class<?> excType )
     {
-        String name = throwable.getClass().getSimpleName();
+        String name = excType.getSimpleName();
         if ( name.endsWith( "Exception" ) )
         {
             return chompLast( name, "Exception" );
@@ -172,26 +164,20 @@ public class SmartStackTraceParser
         return name;
     }
 
-    private String getTruncatedMessage( int i )
+    private static String truncateMessage( String msg, int i )
     {
-        if ( i < 0 )
-        {
-            return "";
-        }
-        String msg = throwable.getMessage();
-        if ( msg == null )
-        {
-            return "";
-        }
-        String substring = msg.substring( 0, Math.min( i, msg.length() ) );
-        if ( i < msg.length() )
+        StringBuilder truncatedMessage = new StringBuilder();
+        if ( i >= 0 && msg != null )
         {
-            return " " + substring + "...";
-        }
-        else
-        {
-            return " " + substring;
+            truncatedMessage.append( ' ' )
+                    .append( msg.substring( 0, min( i, msg.length() ) ) );
+
+            if ( i < msg.length() )
+            {
+                truncatedMessage.append( "..." );
+            }
         }
+        return truncatedMessage.toString();
     }
 
     private boolean rootIsInclass()
@@ -199,7 +185,7 @@ public class SmartStackTraceParser
         return stackTrace.length > 0 && stackTrace[0].getClassName().equals( testClassName );
     }
 
-    static List<StackTraceElement> focusOnClass( StackTraceElement[] stackTrace, Class clazz )
+    private static List<StackTraceElement> focusOnClass( StackTraceElement[] stackTrace, Class<?> clazz )
     {
         List<StackTraceElement> result = new ArrayList<>();
         for ( StackTraceElement element : stackTrace )
@@ -212,7 +198,7 @@ public class SmartStackTraceParser
         return result;
     }
 
-    private static boolean isInSupers( Class testClass, String lookFor )
+    private static boolean isInSupers( Class<?> testClass, String lookFor )
     {
         if ( lookFor.startsWith( "junit.framework." ) )
         {
@@ -263,7 +249,7 @@ public class SmartStackTraceParser
         return result;
     }
 
-    static boolean containsClassName( StackTraceElement[] stackTrace, StackTraceFilter filter )
+    private static boolean containsClassName( StackTraceElement[] stackTrace, StackTraceFilter filter )
     {
         for ( StackTraceElement element : stackTrace )
         {
diff --git a/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/OutermostClass.java b/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/OutermostClass.java
new file mode 100644
index 0000000..be9525e
--- /dev/null
+++ b/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/OutermostClass.java
@@ -0,0 +1,27 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+class OutermostClass {
+    void junit()
+    {
+        new ATestClass().failInAssert();
+    }
+}
diff --git a/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/SmartStackTraceParserTest.java b/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/SmartStackTraceParserTest.java
index d450219..f057ce5 100644
--- a/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/SmartStackTraceParserTest.java
+++ b/surefire-providers/common-java5/src/test/java/org/apache/maven/surefire/report/SmartStackTraceParserTest.java
@@ -36,7 +36,6 @@ public class SmartStackTraceParserTest
     extends TestCase
 {
     public void testGetString()
-        throws Exception
     {
         ATestClass aTestClass = new ATestClass();
         try
@@ -45,16 +44,45 @@ public class SmartStackTraceParserTest
         }
         catch ( AssertionError e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class, e );
+            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "ATestClass.failInAssert:30 X is not Z", res );
+        }
+    }
 
+    public void testGetStringFromNested()
+    {
+        OutermostClass aTestClass = new OutermostClass();
+        try
+        {
+            aTestClass.junit();
         }
+        catch ( AssertionError e )
+        {
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ATestClass.class.getName(), e, null );
+            String res = smartStackTraceParser.getString();
+            assertEquals( "ATestClass.failInAssert:30 X is not Z", res );
+        }
+    }
 
+    public void testGetStringWithMethod()
+    {
+        OutermostClass aTestClass = new OutermostClass();
+        try
+        {
+            aTestClass.junit();
+        }
+        catch ( AssertionError e )
+        {
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( InnerATestClass.class.getName(), e, "myMethod" );
+            String res = smartStackTraceParser.getString();
+            assertEquals( "InnerATestClass.myMethod X is not Z", res );
+        }
     }
 
     public void testNestedFailure()
-        throws Exception
     {
         ATestClass aTestClass = new ATestClass();
         try
@@ -63,14 +91,14 @@ public class SmartStackTraceParserTest
         }
         catch ( AssertionError e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ATestClass.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "ATestClass.nestedFailInAssert:35->failInAssert:30 X is not Z", res );
         }
     }
 
     public void testNestedNpe()
-        throws Exception
     {
         ATestClass aTestClass = new ATestClass();
         try
@@ -79,15 +107,14 @@ public class SmartStackTraceParserTest
         }
         catch ( NullPointerException e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ATestClass.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "ATestClass.nestedNpe:45->npe:40 NullPointer It was null", res );
-
         }
     }
 
     public void testNestedNpeOutsideTest()
-        throws Exception
     {
         ATestClass aTestClass = new ATestClass();
         try
@@ -96,15 +123,14 @@ public class SmartStackTraceParserTest
         }
         catch ( NullPointerException e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ATestClass.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "ATestClass.nestedNpeOutsideTest:55->npeOutsideTest:50 » NullPointer", res );
-
         }
     }
 
     public void testLongMessageTruncation()
-        throws Exception
     {
         ATestClass aTestClass = new ATestClass();
         try
@@ -113,15 +139,15 @@ public class SmartStackTraceParserTest
         }
         catch ( RuntimeException e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ATestClass.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
-            assertEquals( "ATestClass.aLongTestErrorMessage:60 Runtime This message will be truncated, so...", res );
-
+            assertEquals( "ATestClass.aLongTestErrorMessage:60 Runtime This message will be truncated, so...",
+                    res );
         }
     }
 
     public void testFailureInBaseClass()
-        throws Exception
     {
         ASubClass aTestClass = new ASubClass();
         try
@@ -130,14 +156,14 @@ public class SmartStackTraceParserTest
         }
         catch ( NullPointerException e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ASubClass.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ASubClass.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "ASubClass>ABaseClass.npe:27 » NullPointer It was null", res );
         }
     }
 
     public void testClassThatWillFail()
-        throws Exception
     {
         CaseThatWillFail aTestClass = new CaseThatWillFail();
         try
@@ -146,13 +172,14 @@ public class SmartStackTraceParserTest
         }
         catch ( ComparisonFailure e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( CaseThatWillFail.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( CaseThatWillFail.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "CaseThatWillFail.testThatWillFail:29 expected:<[abc]> but was:<[def]>", res );
         }
     }
 
-    public Throwable getAThrownException()
+    private static Throwable getAThrownException()
     {
         try
         {
@@ -186,7 +213,8 @@ public class SmartStackTraceParserTest
         }
         catch ( ComparisonFailure e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( AssertionNoMessage.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( AssertionNoMessage.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "AssertionNoMessage.testThrowSomething:29 expected:<[abc]> but was:<[xyz]>", res );
         }
@@ -200,7 +228,8 @@ public class SmartStackTraceParserTest
         }
         catch ( AssertionFailedError e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( FailWithFail.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( FailWithFail.class.getName(), e, null );
             String res = smartStackTraceParser.getString();
             assertEquals( "FailWithFail.testThatWillFail:29 abc", res );
         }
@@ -243,7 +272,8 @@ public class SmartStackTraceParserTest
         }
         catch ( AssertionError e )
         {
-            SmartStackTraceParser smartStackTraceParser = new SmartStackTraceParser( ATestClass.class, e );
+            SmartStackTraceParser smartStackTraceParser =
+                    new SmartStackTraceParser( ATestClass.class.getName(), e, null );
             Field stackTrace = SmartStackTraceParser.class.getDeclaredField( "stackTrace" );
             stackTrace.setAccessible( true );
             stackTrace.set( smartStackTraceParser, new StackTraceElement[0] );
@@ -303,7 +333,7 @@ public class SmartStackTraceParserTest
         }
     }
 
-    public ExecutionException getSingleNested()
+    private ExecutionException getSingleNested()
     {
         FutureTask<Object> futureTask = new FutureTask<>( new RunnableTestClass2() );
         DaemonThreadFactory.newDaemonThread( futureTask ).start();


[maven-surefire] 02/03: README.md

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

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

commit 8cef8fe9137224e626f356ffe261d5b0e5c37f31
Author: Tibor17 <ti...@apache.org>
AuthorDate: Wed Dec 12 00:33:01 2018 +0100

    README.md
---
 README.md | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 5ac0e1c..b833b52 100644
--- a/README.md
+++ b/README.md
@@ -40,16 +40,14 @@ Usage of [maven-surefire-plugin], [maven-failsafe-plugin], [maven-surefire-repor
 
 # Development Information
 
-In order to build Surefire project use **Maven 3.1.0+** and **JDK 1.8**.   
+Build the Surefire project using **Maven 3.1.0+** and **JDK 1.8**.  
 
-But in order to run IT tests, you can do:   
-
-* In order to run tests for a release check during the vote the following memory requirements are needed:   
+* In order to run tests for a release check during the Vote, the following memory requirements are needed:   
   **(on Linux/Unix)** *export MAVEN_OPTS="-server -Xmx512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true -Dhttps.protocols=TLSv1"*  
   **(on Windows)** *set MAVEN_OPTS="-server -Xmx256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true -Dhttps.protocols=TLSv1"*    
 * In order to run the build with **JDK 9** **on Windows** (**on Linux/Unix modify system property jdk.home**):  
   *mvn install site site:stage -P reporting,run-its "-Djdk.home=e:\Program Files\Java\jdk9\"*
-* In order to run the build with **JDK 11**:
+* In order to run the build with **JDK 11**:    
   *mvn install site site:stage -P reporting,run-its "-Djdk.home=e:\Program Files\Java\jdk11\"*