mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not ignore @Ignore when forked (IDEA-69818)
This commit is contained in:
@@ -34,7 +34,7 @@ public class JUnit4IdeaTestRunner implements IdeaTestRunner {
|
||||
|
||||
public int startRunnerWithArgs(String[] args, ArrayList listeners, boolean sendTree) {
|
||||
|
||||
final Request request = JUnit4TestRunnerUtil.buildRequest(args);
|
||||
final Request request = JUnit4TestRunnerUtil.buildRequest(args, sendTree);
|
||||
final Runner testRunner = request.getRunner();
|
||||
try {
|
||||
Description description = testRunner.getDescription();
|
||||
@@ -132,7 +132,7 @@ public class JUnit4IdeaTestRunner implements IdeaTestRunner {
|
||||
}
|
||||
|
||||
public Object getTestToStart(String[] args) {
|
||||
final Request request = JUnit4TestRunnerUtil.buildRequest(args);
|
||||
final Request request = JUnit4TestRunnerUtil.buildRequest(args, false);
|
||||
final Runner testRunner = request.getRunner();
|
||||
Description description = null;
|
||||
try {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.junit4;
|
||||
|
||||
import com.intellij.rt.execution.junit.JUnitForkedStarter;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.internal.AssumptionViolatedException;
|
||||
import org.junit.internal.requests.ClassRequest;
|
||||
@@ -41,7 +42,7 @@ public class JUnit4TestRunnerUtil {
|
||||
*/
|
||||
private static final ResourceBundle ourBundle = ResourceBundle.getBundle("RuntimeBundle");
|
||||
|
||||
public static Request buildRequest(String[] suiteClassNames) {
|
||||
public static Request buildRequest(String[] suiteClassNames, boolean notForked) {
|
||||
if (suiteClassNames.length == 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -122,7 +123,7 @@ public class JUnit4TestRunnerUtil {
|
||||
try {
|
||||
Class.forName("org.junit.runners.BlockJUnit4ClassRunner"); //ignore IgnoreIgnored for junit4.4 and <
|
||||
final Method method = clazz.getMethod(methodName, null);
|
||||
if (method != null && method.getAnnotation(Ignore.class) != null) { //override ignored case only
|
||||
if (method != null && notForked && method.getAnnotation(Ignore.class) != null) { //override ignored case only
|
||||
final Request classRequest = new ClassRequest(clazz) {
|
||||
public Runner getRunner() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user