mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit 5: override class runner as there could be no class (IDEA-174657)
rerun failed tests assumes that only raw check over runner can be performed
This commit is contained in:
@@ -35,6 +35,7 @@ import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.rt.execution.junit.JUnitStarter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -53,6 +54,12 @@ public class TestMethods extends TestMethod {
|
||||
myFailedTests = failedTests;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected String getPreferredRunner(GlobalSearchScope globalSearchScope) {
|
||||
return JUnitUtil.isJUnit5(globalSearchScope, getConfiguration().getProject()) ? JUnitStarter.JUNIT5_PARAMETER : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JavaParameters createJavaParameters() throws ExecutionException {
|
||||
final JavaParameters javaParameters = super.createDefaultJavaParameters();
|
||||
|
||||
Reference in New Issue
Block a user