public void End() { lock (this) { if (isActive == false) { //End msg arrive earlier than Start msg, wait Start msg to be processed Monitor.Wait(this); } if (isActive) { if (reportToMonitor) { context.Monitor.EndTest(unitTest, result); unitTest.Status = TestStatus.Ready; unitTest.RegisterResult(context, result); } // notify the parent session after finishing the test itself if (parentSession != null) { parentSession.OnChildSessionFinished(this); } isActive = false; } } }
public void End() { if (isActive) { if (reportToMonitor) { context.Monitor.EndTest(unitTest, result); unitTest.Status = TestStatus.Ready; unitTest.RegisterResult(context, result); } // notify the parent session after finishing the test itself if (parentSession != null) { parentSession.OnChildSessionFinished(this); } isActive = false; } }