void () { fireOnBeforeTestingFinished(myTestsRootProxy); LOG.debug("onFinishTesting"); // has been already invoked! // We don't know whether process was destroyed by user // or it finished after all tests have been run // Lets assume, if at finish all nodes except root suite have final state (passed, failed or ignored), // then all is ok otherwise process was terminated by user LOG.debug("onFinishTesting: invoked"); if (myIsTestingFinished) { LOG.debug("has already been invoked"); // has been already invoked! return; } myIsTestingFinished = true; // We don't know whether process was destroyed by user // or it finished after all tests have been run // Lets assume, if at finish all nodes except root suite have final state (passed, failed or ignored), // then all is ok otherwise process was terminated by user boolean completeTree = isTreeComplete(myRunningTestNodes, myTestsRootProxy); if (LOG.isDebugEnabled()) { LOG.debug("completeTree:" + completeTree); } if (completeTree) { myTestsRootProxy.setFinished(); } else { myTestsRootProxy.setTerminated(); } if (!myRunningTestNodes.isEmpty()) { logProblem("Unexpected running nodes: " + myRunningTestNodes); } myNodeByIdMap.clear(); myRunningTestNodes.clear(); myRunningSuiteNodes.clear(); fireOnTestingFinished(myTestsRootProxy); super.onFinishTesting(); }