diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/OutputToGeneralTestEventsConverter.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/OutputToGeneralTestEventsConverter.java index b4f3ae9f45f2..c57111d9db64 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/OutputToGeneralTestEventsConverter.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/OutputToGeneralTestEventsConverter.java @@ -32,11 +32,11 @@ import static com.intellij.execution.testframework.sm.runner.GeneralToSMTRunnerE /** * @author Roman Chernyatchik - * - * This implementation also supports messages splitted in parts by early flush. - * Implementation assumes that buffer is being flushed on line end or by timer, - * i.e. incomming text contains no more than one line's end marker ('\r', '\n', or "\r\n") - * (e.g. process was run with IDEA program's runner) + *
+ * This implementation also supports messages splitted in parts by early flush. + * Implementation assumes that buffer is being flushed on line end or by timer, + * i.e. incomming text contains no more than one line's end marker ('\r', '\n', or "\r\n") + * (e.g. process was run with IDEA program's runner) */ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer { private static final Logger LOG = Logger.getInstance(OutputToGeneralTestEventsConverter.class.getName()); @@ -119,19 +119,20 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer } //fire current output fireOnUncapturedOutput(outputToProcess, outputType); - } else { + } + else { myPendingLineBreakFlag = false; } } catch (ParseException e) { - LOG.error(getTFrameworkPrefix(myTestFrameworkName) + "Error parsing text: ["+text+"]", e); + LOG.error(getTFrameworkPrefix(myTestFrameworkName) + "Error parsing text: [" + text + "]", e); } } protected boolean processServiceMessages(final String text, - final Key outputType, - final ServiceMessageVisitor visitor) throws ParseException { + final Key outputType, + final ServiceMessageVisitor visitor) throws ParseException { // service message parser expects line like "##teamcity[ .... ]" without whitespaces in the end. final ServiceMessage message = ServiceMessage.parse(text.trim()); if (message != null) { @@ -141,7 +142,7 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer } - private void fireOnTestStarted(final String testName, @Nullable final String locationUrl) { + private void fireOnTestStarted(final String testName, @Nullable final String locationUrl) { assertNotNull(testName); // local variable is used to prevent concurrent modification @@ -159,8 +160,8 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer assertNotNull(testName); assertNotNull(localizedMessage); - // local variable is used to prevent concurrent modification - final GeneralTestEventsProcessor processor = myProcessor; + // local variable is used to prevent concurrent modification + final GeneralTestEventsProcessor processor = myProcessor; if (processor != null) { processor.onTestFailure(testName, localizedMessage, stackTrace, isTestError, comparisionFailureActualText, @@ -277,8 +278,8 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer } protected void fireOnErrorMsg(final String localizedMessage, - @Nullable final String stackTrace, - boolean isCritical) { + @Nullable final String stackTrace, + boolean isCritical) { assertNotNull(localizedMessage); // local variable is used to prevent concurrent modification @@ -332,7 +333,8 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer final String oldLocation = attrs.get(ATTR_KEY_LOCATION_URL_OLD); if (oldLocation != null) { LOG.error(getTFrameworkPrefix(myTestFrameworkName) - + "Test Runner API was changed for TeamCity 5.0 compatibility. Please use 'locationHint' attribute instead of 'location'."); + + + "Test Runner API was changed for TeamCity 5.0 compatibility. Please use 'locationHint' attribute instead of 'location'."); return oldLocation; } return null; @@ -365,7 +367,7 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer if (!StringUtil.isEmptyOrSpaces(durationStr)) { duration = convertToInt(durationStr, testFinished); } - + fireOnTestFinished(testFinished.getTestName(), duration); } @@ -375,19 +377,19 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer } public void visitTestStdOut(@NotNull final TestStdOut testStdOut) { - fireOnTestOutput(testStdOut.getTestName(),testStdOut.getStdOut(), true); + fireOnTestOutput(testStdOut.getTestName(), testStdOut.getStdOut(), true); } public void visitTestStdErr(@NotNull final TestStdErr testStdErr) { - fireOnTestOutput(testStdErr.getTestName(),testStdErr.getStdErr(), false); + fireOnTestOutput(testStdErr.getTestName(), testStdErr.getStdErr(), false); } public void visitTestFailed(@NotNull final TestFailed testFailed) { final boolean isTestError = testFailed.getAttributes().get(ATTR_KEY_TEST_ERROR) != null; - fireOnTestFailure(testFailed.getTestName(), - testFailed.getFailureMessage(), - testFailed.getStacktrace(), + fireOnTestFailure(testFailed.getTestName(), + testFailed.getFailureMessage(), + testFailed.getStacktrace(), isTestError, testFailed.getActual(), testFailed.getExpected()); @@ -424,10 +426,10 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer @Override public void visitMessageWithStatus(@NotNull Message msg) { final String name = msg.getMessageName(); - final Map