maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject git commit: o Updated docs on junit run listening, renamed classes in test
Date Fri, 21 Dec 2012 09:41:30 GMT
Updated Branches:
  refs/heads/master 63fc2b433 -> 4b09fd133


o Updated docs on junit run listening, renamed classes in test


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/4b09fd13
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/4b09fd13
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/4b09fd13

Branch: refs/heads/master
Commit: 4b09fd133419de4b7c9354e8a9cb57a42b5a8c3b
Parents: 63fc2b4
Author: Kristian Rosenvold <krosenvold@apache.org>
Authored: Fri Dec 21 10:40:29 2012 +0100
Committer: Kristian Rosenvold <krosenvold@apache.org>
Committed: Fri Dec 21 10:40:29 2012 +0100

----------------------------------------------------------------------
 .../src/test/java/junit/ignore/BasicTest.java      |   18 -------
 .../java/junit/ignore/ClassLevelIgnore1Test.java   |   17 -------
 .../java/junit/ignore/ClassLevelIgnore2Test.java   |   17 -------
 .../java/junit/ignore/IgnoreWithMessagesTest.java  |   38 ---------------
 .../surefire/junitcore/ConcurrentRunListener.java  |    1 +
 .../surefire/junitcore/JUnitCoreRunListener.java   |   10 ++++
 6 files changed, 11 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b09fd13/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/BasicTest.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/BasicTest.java
b/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/BasicTest.java
deleted file mode 100644
index b7d55b2..0000000
--- a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/BasicTest.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package junit.ignore;
-
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-
-@Ignore( "ignore this test" )
-public class BasicTest
-{
-
-    @Ignore( "ignore this test" )
-    @Test
-    public void testIgnorable()
-    {
-        Assert.fail( "you should have ignored me!" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b09fd13/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore1Test.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore1Test.java
b/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore1Test.java
deleted file mode 100644
index ca00609..0000000
--- a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore1Test.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package junit.ignore;
-
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-
-@Ignore( "ignore this test" )
-public class ClassLevelIgnore1Test
-{
-
-    @Test
-    public void testIgnorable()
-    {
-        Assert.fail( "you should have ignored me!" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b09fd13/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore2Test.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore2Test.java
b/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore2Test.java
deleted file mode 100644
index c460f49..0000000
--- a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/ClassLevelIgnore2Test.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package junit.ignore;
-
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-
-@Ignore( "ignore this test" )
-public class ClassLevelIgnore2Test
-{
-
-    @Test
-    public void testIgnorable()
-    {
-        Assert.fail( "you should have ignored me!" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b09fd13/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/IgnoreWithMessagesTest.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/IgnoreWithMessagesTest.java
b/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/IgnoreWithMessagesTest.java
deleted file mode 100644
index 06c18f3..0000000
--- a/surefire-integration-tests/src/test/resources/junit-ignore/src/test/java/junit/ignore/IgnoreWithMessagesTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package junit.ignore;
-
-import org.junit.Assume;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * @author Kristian Rosenvold
- */
-public class IgnoreWithMessagesTest
-{
-
-    @Ignore
-    @Test
-    public void testWithIgnore1()
-    {
-    }
-
-    @Ignore("Ignorance is bliss2")
-    @Test
-    public void testWithIgnore2()
-    {
-    }
-
-    @Ignore("Ignorance \"is\' <>bliss2")
-    @Test
-    public void testWithQuotesInIgnore()
-    {
-    }
-
-    @Test
-    public void testWithAssumptionFailure()
-    {
-        Assume.assumeNotNull( new Object[]{ null} );
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b09fd13/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentRunListener.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentRunListener.java
b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentRunListener.java
index 91abb21..a1db7f3 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentRunListener.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentRunListener.java
@@ -35,6 +35,7 @@ import org.apache.maven.surefire.testset.TestSetFailedException;
  * parallel=methods; beforeClass/afterClass run on main thread, constructor + each test method
run on same thread
  * parallel=both; same as parallel=methods
  *
+ * @see org.apache.maven.surefire.junitcore.JUnitCoreRunListener for details about regular
junit run listening
  * @author Kristian Rosenvold
  */
 public abstract class ConcurrentRunListener

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b09fd13/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
index 9bbb8b7..1d8ea74 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
@@ -30,6 +30,16 @@ import org.junit.runner.Description;
 import org.junit.runner.Result;
 import org.junit.runner.notification.Failure;
 
+/**
+ * Noteworthy things about JUnit4 listening:
+ *
+ * A class that is annotated with @Ignore will have one invocation of "testSkipped" with
source==name
+ * A method that is annotated with @Ignore will have a invocation of testSkipped with source
and name distinct
+ * Methods annotated with @Ignore trigger no further events.
+ *
+ * @see org.apache.maven.surefire.junitcore.ConcurrentRunListener for details about parallel
running
+ *
+ */
 public class JUnitCoreRunListener
     extends JUnit4RunListener
 {


Mime
View raw message