fitnesse icon indicating copy to clipboard operation
fitnesse copied to clipboard

Test/suite aborts with exception when browser is closed

Open schreeedi opened this issue 9 years ago • 1 comments

I am running fitnesse-standalone.jar v20160618. When a test or suite in a browser is started by clicking on "Test" or "Suite" and the browser is closed while the test or suite is running, the testrun is aborted and no result is written with the following exception.

The expected behavior is that it just ignores the closed socket to the browser, continues and finishes the test or suite and writes the test results.

Exception in thread "FitClient fitOutput" java.lang.RuntimeException: java.net.SocketException: Software caused connection abort: socket write error at fitnesse.reporting.InteractiveFormatter.writeData(InteractiveFormatter.java:34) at fitnesse.reporting.InteractiveFormatter.errorOccurred(InteractiveFormatter.java:85) at fitnesse.reporting.InteractiveFormatter.testSystemStopped(InteractiveFormatter.java:91) at fitnesse.testsystems.CompositeTestSystemListener.testSystemStopped(CompositeTestSystemListener.java:54) at fitnesse.testrunner.MultipleTestsRunner$InternalTestSystemListener.testSystemStopped(MultipleTestsRunner.java:208) at fitnesse.testsystems.CompositeTestSystemListener.testSystemStopped(CompositeTestSystemListener.java:54) at fitnesse.testsystems.fit.FitTestSystem.testSystemStopped(FitTestSystem.java:122) at fitnesse.testsystems.fit.FitTestSystem.exceptionOccurred(FitTestSystem.java:111) at fitnesse.testsystems.fit.FitClient.exceptionOccurred(FitClient.java:112) at fitnesse.testsystems.fit.FitClient$FitListeningRunnable.listenToFit(FitClient.java:125) at fitnesse.testsystems.fit.FitClient$FitListeningRunnable.run(FitClient.java:118) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) at java.net.SocketOutputStream.write(SocketOutputStream.java:147) at fitnesse.FitNesseExpediter.send(FitNesseExpediter.java:72) at fitnesse.http.ChunkedResponse.add(ChunkedResponse.java:55) at fitnesse.http.ChunkedResponse.add(ChunkedResponse.java:43) at fitnesse.http.ChunkedResponse$1.write(ChunkedResponse.java:114) at fitnesse.reporting.InteractiveFormatter.writeData(InteractiveFormatter.java:32) ... 11 more

schreeedi avatar Nov 23 '16 11:11 schreeedi

As always there are 2 sides to this:

  1. I agree. I'd like to have tests running with and without a browser
  2. It's hard to stop a test session once the browser connection has been closed. It basically requires you to kill the process by hand. Also it's tempting to start another test session, since the first test session seems to be gone.

I also would like it if you can see running session, independent from who started those. Maybe even get a notification when a test session ended, so you can jump to the results instantly.

amolenaar avatar Nov 28 '16 14:11 amolenaar