junit 5: if decided to run with junit 5, let it discover tests
[idea/community.git] / plugins / junit5_rt / src / com / intellij / junit5 / JUnit5TestRunnerUtil.java
index 56aafe4eb29d1406efce95781dcccfde533427f5..fb945600ac3bbd8767b7551e5cc14e653a76c623 100644 (file)
@@ -56,10 +56,7 @@ public class JUnit5TestRunnerUtil {
             lines.add(line);
           }
           packageNameRef[0] = packageName.length() == 0 ? "<default package>" : packageName;
-          if (JUnitStarter.isJUnit5Preferred()) {
-            final PackageSelector selector = DiscoverySelectors.selectPackage(packageName);
-            return builder.selectors(selector).build();
-          }
+          return builder.selectors(DiscoverySelectors.selectPackage(packageName)).build();
         }
         finally {
           reader.close();