private void _addTestOrSuite(@NotNull final SMTestProxy newTestOrSuite) { final SMTestProxy parentSuite = newTestOrSuite.getParent(); assert parentSuite != null; // Tree final Update update = new Update(parentSuite) { @Override public void run() { myRequests.remove(this); myTreeBuilder.updateTestsSubtree(parentSuite); } }; if (ApplicationManager.getApplication().isUnitTestMode()) { update.run(); } else if (myRequests.add(update) && !myUpdateQueue.isDisposed()) { myUpdateQueue.addRequest(update, 100); } myTreeBuilder.repaintWithParents(newTestOrSuite); myAnimator.setCurrentTestCase(newTestOrSuite); if (TestConsoleProperties.TRACK_RUNNING_TEST.value(myProperties)) { if (myLastSelected == null || myLastSelected == newTestOrSuite) { myLastSelected = null; selectAndNotify(newTestOrSuite); } } }
public void onTestFailed(@NotNull final SMTestProxy test) { updateOnTestFailed(false); if (test.isConfig()) { myStartedTestCount++; myFinishedTestCount++; } updateIconProgress(false); // still expand failure when user selected another test if (myLastSelected != null && TestConsoleProperties.TRACK_RUNNING_TEST.value(myProperties) && TestConsoleProperties.HIDE_PASSED_TESTS.value(myProperties)) { myTreeBuilder.expand(test, null); } }