mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
Behave properly when using Surefire excludedGroups (i.e. @Category).
To reproduce SUREFIRE-974 prior to this fix, pick an arbitrary group class to (not) exclude: mvn -f test/pom.xml -Dtest=CoreJellyTest -DexcludedGroups=hudson.ExtensionPoint test
This commit is contained in:
1 parent
101507f498
commit
a9e1de4f65
1 file changed
+7
-1
@@ -25,6 +25,9 @@ package org.jvnet.hudson.test.junit;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
import junit.framework.TestResult;
|
||||
import org.junit.runner.manipulation.Filter;
|
||||
import org.junit.runner.manipulation.Filterable;
|
||||
import org.junit.runner.manipulation.NoTestsRemainException;
|
||||
|
||||
/**
|
||||
* {@link TestSuite} that requires some set up and tear down for executing nested tests.
|
||||
@@ -34,7 +37,7 @@ import junit.framework.TestResult;
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public class GroupedTest extends TestSuite {
|
||||
public class GroupedTest extends TestSuite implements Filterable {
|
||||
@Override
|
||||
public int countTestCases() {
|
||||
return super.countTestCases()+1;
|
||||
@@ -68,4 +71,7 @@ public class GroupedTest extends TestSuite {
|
||||
}
|
||||
protected void tearDown() throws Exception {
|
||||
}
|
||||
|
||||
public void filter(Filter filter) throws NoTestsRemainException {} // SUREFIRE-974
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user