From 3a50851b843bea3c215bb786ace5b8df3f75bada Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Wed, 17 Sep 2008 15:44:10 +0400 Subject: [PATCH] Misprint in fix for [RUBY-1767] was corrected --- .../sm/runner/ui/SMTestRunnerResultsForm.java | 2 +- .../GeneralToSMTRunnerEventsConvertorTest.java | 51 +++++++++++----------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/plugins/ruby/src/org/jetbrains/plugins/ruby/testing/sm/runner/ui/SMTestRunnerResultsForm.java b/plugins/ruby/src/org/jetbrains/plugins/ruby/testing/sm/runner/ui/SMTestRunnerResultsForm.java index bce65bf455..9320804339 100644 --- a/plugins/ruby/src/org/jetbrains/plugins/ruby/testing/sm/runner/ui/SMTestRunnerResultsForm.java +++ b/plugins/ruby/src/org/jetbrains/plugins/ruby/testing/sm/runner/ui/SMTestRunnerResultsForm.java @@ -273,7 +273,7 @@ public class SMTestRunnerResultsForm implements TestFrameworkRunningModel, LogCo myAnimator.stopMovie(); - myTreeBuilder.performUpdate(); + myTreeBuilder.updateFromRoot(); LvcsHelper.addLabel(this); diff --git a/plugins/ruby/testSrc/org/jetbrains/plugins/ruby/testing/sm/runner/GeneralToSMTRunnerEventsConvertorTest.java b/plugins/ruby/testSrc/org/jetbrains/plugins/ruby/testing/sm/runner/GeneralToSMTRunnerEventsConvertorTest.java index fe659b4da4..500a15ea64 100644 --- a/plugins/ruby/testSrc/org/jetbrains/plugins/ruby/testing/sm/runner/GeneralToSMTRunnerEventsConvertorTest.java +++ b/plugins/ruby/testSrc/org/jetbrains/plugins/ruby/testing/sm/runner/GeneralToSMTRunnerEventsConvertorTest.java @@ -309,32 +309,31 @@ public class GeneralToSMTRunnerEventsConvertorTest extends BaseSMTRunnerTestCase assertEquals(0, children.get(1).getChildren().size()); } - //public void testRuby_1767() throws InterruptedException { - // TestConsoleProperties.HIDE_PASSED_TESTS.set(myConsoleProperties, true); - // - // myEventsProcessor.onSuiteStarted("suite"); - // myResultsViewer.performUpdate(); - // - // myEventsProcessor.onTestStarted("test_failed"); - // myResultsViewer.performUpdate(); - // myEventsProcessor.onTestFailure("test_failed", "", "", false); - // myResultsViewer.performUpdate(); - // myEventsProcessor.onTestFinished("test_failed", 10); - // myResultsViewer.performUpdate(); - // - // myEventsProcessor.onTestStarted("test"); - // myResultsViewer.performUpdate(); - // assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0))); - // - // myEventsProcessor.onTestFinished("test", 10); - // assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0))); - // - // myEventsProcessor.onSuiteFinished("suite"); - // myEventsProcessor.onFinishTesting(); - // - // //TODO[romeo]: investigate why test doesn't work... - // assertEquals(1, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0))); - //} + public void testRuby_1767() throws InterruptedException { + TestConsoleProperties.HIDE_PASSED_TESTS.set(myConsoleProperties, true); + + myEventsProcessor.onSuiteStarted("suite"); + myResultsViewer.performUpdate(); + + myEventsProcessor.onTestStarted("test_failed"); + myResultsViewer.performUpdate(); + myEventsProcessor.onTestFailure("test_failed", "", "", false); + myResultsViewer.performUpdate(); + myEventsProcessor.onTestFinished("test_failed", 10); + myResultsViewer.performUpdate(); + + myEventsProcessor.onTestStarted("test"); + myResultsViewer.performUpdate(); + assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0))); + + myEventsProcessor.onTestFinished("test", 10); + assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0))); + + myEventsProcessor.onSuiteFinished("suite"); + myEventsProcessor.onFinishTesting(); + + assertEquals(1, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0))); + } private void onTestStarted(final String testName) { -- 2.11.4.GIT