Description
What: Script test hangs after successful completion, reporting results and browser closing
Where: ScriptSharp.Testing version=0.7.5 + NUnit 2.6.1
When Started: After implementation of the test web server switched from the Cassini to the "quick and dirty" implementation
Details: Hang happens after return from the WebTest.StopWebServer(). Probably during stopping server thread unhandled exception caused unexpected behavior.
Test Output (with debugger):
"""
...
Completed; failures = 0; total = 111
---- UNHANDLED EXCEPTION ----
Thread Name:
System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.Flush()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Flush()
at ScriptSharp.Testing.WebServer.HttpMessage.WriteStatus(HttpStatusCode statusCode)
at ScriptSharp.Testing.WebServer.HttpMessage.Run()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
"""