search for tests in directory restored for down-up approach
[idea/community.git] / plugins / junit / src / com / intellij / execution / junit / TestPackage.java
index b6bbdc5a42d95d5e9b64f8fabaa5c897c080971b..2b33f85427bba8d530cf205861b92360968a46cc 100644 (file)
@@ -84,8 +84,7 @@ public class TestPackage extends TestObject {
             LOG.assertTrue(classFilter.getBase() != null);
             long start = System.currentTimeMillis();
             if (Registry.is("junit4.search.4.tests.all.in.scope", true)) {
-              String packageName = getPackageName(data);
-              PsiPackage aPackage = JavaPsiFacade.getInstance(myProject).findPackage(packageName);
+              PsiPackage aPackage = getPackage(data);
               if (aPackage != null) {
                 collectClassesRecursively(aPackage, GlobalSearchScope.projectScope(myProject).intersectWith(classFilter.getScope()),
                                           aClass -> ReadAction.compute(() -> classFilter.isAccepted(aClass)));