mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit 3: workaround not to filter out "warning" suites when test was not correctly created (IDEA-123209)
This commit is contained in:
@@ -157,7 +157,20 @@ public class JUnit4TestRunnerUtil {
|
||||
catch (Throwable e) {
|
||||
//ignore
|
||||
}
|
||||
return Request.method(clazz, methodName);
|
||||
final Filter methodFilter = Filter.matchMethodDescription(Description.createTestDescription(clazz, methodName));
|
||||
return Request.aClass(clazz).filterWith(new Filter() {
|
||||
public boolean shouldRun(Description description) {
|
||||
if (description.isTest() && description.getDisplayName().startsWith("warning(junit.framework.TestSuite$")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return methodFilter.shouldRun(description);
|
||||
}
|
||||
|
||||
public String describe() {
|
||||
return methodFilter.describe();
|
||||
}
|
||||
});
|
||||
} else if (name != null && suiteClassNames.length == 1) {
|
||||
final Class clazz = loadTestClass(suiteClassName);
|
||||
if (clazz != null) {
|
||||
|
||||
Reference in New Issue
Block a user