test runner: don't print empty suite (IDEA-115542)

This commit is contained in:
Anna.Kozlova
2018-09-26 13:53:51 +02:00
parent b42823c43f
commit 445390c13c
4 changed files with 2 additions and 27 deletions
@@ -15,7 +15,6 @@ sm.test.runner.ui.tests.tree.presentation.labels.was.terminated=Terminated
sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found=No tests were found
sm.test.runner.ui.tests.tree.presentation.labels.test.reporter.not.attached=Test framework quit unexpectedly
sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found.with.errors=No tests were found. Errors occurred
sm.test.runner.ui.tests.tree.presentation.labels.empty.test.suite=Empty test suite
sm.test.runner.ui.tests.tree.presentation.labels.all.tests.passed=All Tests Passed
sm.test.runner.ui.tests.tree.presentation.labels.all.but.ignored.passed=All Tests Passed (except ignored)
sm.test.runner.ui.tests.tree.presentation.labels.test.noname=<no name>
@@ -36,5 +35,4 @@ sm.test.runner.ui.tabs.statistics.columns.results.count.msg.passed=P:{0}
sm.test.runner.ui.tabs.statistics.columns.results.count.msg.ignored=I:{0}
sm.test.runner.ui.tabs.statistics.columns.results.no.tests=<NO TESTS>
sm.test.runner.states.suite.is.empty=Empty test suite.
sm.test.runner.states.test.is.ignored=Test ignored.
@@ -798,7 +798,7 @@ public class SMTestProxy extends AbstractTestProxy {
protected AbstractState determineSuiteStateOnFinished() {
final AbstractState state;
if (isLeaf()) {
state = SuiteFinishedState.EMPTY_LEAF_SUITE;
state = SuiteFinishedState.EMPTY_SUITE;
}
else if (isDefect()) {
// Test suit contains errors if at least one of its tests contains error
@@ -15,18 +15,10 @@
*/
package com.intellij.execution.testframework.sm.runner.states;
import com.intellij.execution.testframework.CompositePrintable;
import com.intellij.execution.testframework.Printer;
import com.intellij.execution.testframework.sm.SMTestsRunnerBundle;
import com.intellij.execution.ui.ConsoleViewContentType;
import org.jetbrains.annotations.NonNls;
/**
* @author Roman Chernyatchik
*/
public abstract class SuiteFinishedState extends AbstractState {
@NonNls private static final String EMPTY_SUITE_TEXT = SMTestsRunnerBundle.message("sm.test.runner.states.suite.is.empty");
//This states are common for all instances and doesn't contains
//instance-specific information
@@ -96,21 +88,6 @@ public abstract class SuiteFinishedState extends AbstractState {
}
};
/**
* Finished empty leaf test suite
*/
public static SuiteFinishedState EMPTY_LEAF_SUITE = new EmptySuite() {
@Override
public void printOn(final Printer printer) {
super.printOn(printer);
final String msg = EMPTY_SUITE_TEXT + CompositePrintable.NEW_LINE;
printer.print(msg, ConsoleViewContentType.SYSTEM_OUTPUT);
}
};
/**
* Finished empty test suite
*/
@@ -522,7 +522,7 @@ public class SMTRunnerConsoleTest extends BaseSMTRunnerTestCase {
//the string above doesn't update tree immediately so we should simulate update
myConsole.getPrinter().updateOnTestSelected(myResultsViewer.getTestsRootNode());
assertAllOutputs(myMockResettablePrinter, "preved", "","Empty test suite.\n");
assertAllOutputs(myMockResettablePrinter, "preved", "","");
}
public void testPrintingOnlyOwnContentForRoot() {