mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit: don't send one-node tree to avoid confusions ala @Unroll (IDEA-146619)
This commit is contained in:
-2
@@ -34,7 +34,6 @@ public class JUnitTreeByDescriptionHierarchyTest {
|
||||
@Test
|
||||
public void testEmptySuite() throws Exception {
|
||||
doTest(Description.createSuiteDescription("empty suite"), "##teamcity[enteredTheMatrix]\n" +
|
||||
"##teamcity[suiteTreeNode name='empty suite' locationHint='java:test://empty suite.empty suite']\n" +
|
||||
"##teamcity[treeEnded]\n");
|
||||
}
|
||||
|
||||
@@ -423,7 +422,6 @@ public class JUnitTreeByDescriptionHierarchyTest {
|
||||
final Description rootDescription = Description.createTestDescription("TestA", "testName");
|
||||
doTest(rootDescription, Collections.singletonList(rootDescription),
|
||||
"##teamcity[enteredTheMatrix]\n" +
|
||||
"##teamcity[suiteTreeNode name='TestA.testName' locationHint='java:test://TestA.testName']\n" +
|
||||
"##teamcity[treeEnded]\n",
|
||||
"##teamcity[rootName name = 'TestA' location = 'java:suite://TestA']\n" +
|
||||
"##teamcity[testStarted name='TestA.testName' locationHint='java:test://TestA.testName']\n" +
|
||||
|
||||
@@ -325,15 +325,14 @@ public class JUnit4TestListener extends RunListener {
|
||||
String className = JUnit4ReflectionUtil.getClassName(description);
|
||||
if (description.getChildren().isEmpty()) {
|
||||
final String methodName = getFullMethodName((Description)description, parent);
|
||||
if (methodName != null) {
|
||||
if (parent != null) {
|
||||
List parents = (List)myParents.get(description);
|
||||
if (parents == null) {
|
||||
parents = new ArrayList(1);
|
||||
myParents.put(description, parents);
|
||||
}
|
||||
parents.add(pParents);
|
||||
if (methodName != null && parent != null) {
|
||||
List parents = (List)myParents.get(description);
|
||||
if (parents == null) {
|
||||
parents = new ArrayList(1);
|
||||
myParents.put(description, parents);
|
||||
}
|
||||
parents.add(pParents);
|
||||
|
||||
if (isWarning(methodName, className)) {
|
||||
className = JUnit4ReflectionUtil.getClassName(parent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user