void (@NotNull ExternalSystemFinishEvent<? extends TestOperationDescriptor> event) { var testId = event.getEventId(); var testResult = event.getOperationResult(); var startTime = testResult.getStartTime(); var endTime = testResult.getEndTime(); var testProxy = findTestProxy(testId); if (testProxy == null) { LOG.error("Cannot find test proxy for: " + testId); return; } testProxy.setDuration(endTime - startTime); if (testResult instanceof SuccessResult) { testProxy.setFinished(); getResultsViewer().onTestFinished(testProxy); getExecutionConsole().getEventPublisher().onTestFinished(testProxy); } else if (testResult instanceof SkippedResult) { testProxy.setTestIgnored(null, null); getResultsViewer().onTestIgnored(testProxy); getExecutionConsole().getEventPublisher().onTestIgnored(testProxy); getResultsViewer().onTestFinished(testProxy); getExecutionConsole().getEventPublisher().onTestFinished(testProxy); } else if (testResult instanceof FailureResult failureResult) { for (var failure : failureResult.getFailures()) { processFailureResult(testProxy, failure); } getResultsViewer().onTestFailed(testProxy); getExecutionConsole().getEventPublisher().onTestFailed(testProxy); getResultsViewer().onTestFinished(testProxy); getExecutionConsole().getEventPublisher().onTestFinished(testProxy); } else { LOG.warn("Undefined test result: " + testResult.getClass().getName()); getResultsViewer().onTestFinished(testProxy); getExecutionConsole().getEventPublisher().onTestFinished(testProxy); } }