void (final @NotNull TestFailedEvent testFailedEvent) { if (LOG.isDebugEnabled()) { LOG.debug("onTestFailure " + testFailedEvent.getId()); } ((Runnable)() -> { if (LOG.isDebugEnabled()) { LOG.debug("onTestFailure invoked " + testFailedEvent.getId()); } Node node = findNodeToTerminate(testFailedEvent); if (node == null) { return; } SMTestProxy testProxy = node.getProxy(); String comparisonFailureActualText = testFailedEvent.getComparisonFailureActualText(); String comparisonFailureExpectedText = testFailedEvent.getComparisonFailureExpectedText(); String failureMessage = testFailedEvent.getLocalizedFailureMessage(); String stackTrace = testFailedEvent.getStacktrace(); if (comparisonFailureActualText != null && comparisonFailureExpectedText != null) { testProxy .setTestComparisonFailed(failureMessage, stackTrace, comparisonFailureActualText, comparisonFailureExpectedText, testFailedEvent); } else if (comparisonFailureActualText == null && comparisonFailureExpectedText == null) { testProxy.setTestFailed(failureMessage, stackTrace, testFailedEvent.isTestError()); } else { logProblem("Comparison failure actual and expected texts should be both null or not null.\n" + "Expected:\n" + comparisonFailureExpectedText + "\n" + "Actual:\n" + comparisonFailureActualText); testProxy.setTestFailed(failureMessage, stackTrace, testFailedEvent.isTestError()); } long duration = testFailedEvent.getDurationMillis(); if (duration >= 0) { testProxy.setDuration(duration); } fireOnTestFailed(testProxy, node.getId()); fireOnTestFinishedIfNeeded(testProxy, node); terminateNode(node, State.FAILED); }).run(); }