From dc0cbb5263d44d857f73ca2dabbe664b3c22c395 Mon Sep 17 00:00:00 2001 From: anna Date: Mon, 9 Nov 2009 20:20:52 +0300 Subject: [PATCH] junit: do not stop if wasn't start (IDEADEV-41262) --- plugins/junit_rt/src/com/intellij/junit3/TestResultsSender.java | 1 - plugins/junit_rt/src/com/intellij/junit4/JUnit4TestResultsSender.java | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/junit_rt/src/com/intellij/junit3/TestResultsSender.java b/plugins/junit_rt/src/com/intellij/junit3/TestResultsSender.java index cfd75989ec..54eb7ba2d7 100644 --- a/plugins/junit_rt/src/com/intellij/junit3/TestResultsSender.java +++ b/plugins/junit_rt/src/com/intellij/junit3/TestResultsSender.java @@ -38,7 +38,6 @@ public class TestResultsSender implements TestListener { public synchronized void addError(Test test, Throwable throwable) { if (throwable instanceof AssertionError) { - // junit4 makes no distinction between errors and failures doAddFailure(test, (Error)throwable); } else { diff --git a/plugins/junit_rt/src/com/intellij/junit4/JUnit4TestResultsSender.java b/plugins/junit_rt/src/com/intellij/junit4/JUnit4TestResultsSender.java index fed91ef27f..2684a98a30 100644 --- a/plugins/junit_rt/src/com/intellij/junit4/JUnit4TestResultsSender.java +++ b/plugins/junit_rt/src/com/intellij/junit4/JUnit4TestResultsSender.java @@ -63,7 +63,9 @@ public class JUnit4TestResultsSender extends RunListener { } private void doAddFailure(final Description test, final Throwable assertion) { - stopMeter(test); + if (test.equals(myCurrentTest)) { + stopMeter(test); + } createExceptionNotification(assertion).createPacket(myRegistry, test).send(); } -- 2.11.4.GIT