mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ensure tests are found on rerun failed when default configuration ensures searching inside one module only (IDEA-168521)
This commit is contained in:
@@ -35,7 +35,6 @@ import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.util.Function;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -58,10 +57,11 @@ public class TestMethods extends TestMethod {
|
||||
protected JavaParameters createJavaParameters() throws ExecutionException {
|
||||
final JavaParameters javaParameters = super.createDefaultJavaParameters();
|
||||
final JUnitConfiguration.Data data = getConfiguration().getPersistentData();
|
||||
RunConfigurationModule module = getConfiguration().getConfigurationModule();
|
||||
final Project project = module.getProject();
|
||||
final SourceScope scope = getSourceScope();
|
||||
final GlobalSearchScope searchScope = scope != null ? scope.getGlobalSearchScope() : GlobalSearchScope.allScope(project);
|
||||
final RunConfigurationModule configurationModule = getConfiguration().getConfigurationModule();
|
||||
final Project project = configurationModule.getProject();
|
||||
final Module module = configurationModule.getModule();
|
||||
final GlobalSearchScope searchScope = module != null ? module.getModuleRuntimeScope(true)
|
||||
: GlobalSearchScope.allScope(project);
|
||||
addClassesListToJavaParameters(myFailedTests, testInfo -> testInfo != null ? getTestPresentation(testInfo, project, searchScope) : null, data.getPackageName(), true, javaParameters);
|
||||
|
||||
return javaParameters;
|
||||
|
||||
Reference in New Issue
Block a user