6ev4uk / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

IO Exception When Using Coverage Plugin #370

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I'm using the jstd-maven plugin to run a suite of Jasmine-based tests in 
Firefox. The tests work fine by themselves. When I try to add the coverage 
plugin, it runs through all the tests once, then I see "Firefox: Runner reset". 
It then proceeds to load up and run all of the tests again, but after 6 tests, 
I get this error:

Failures during test run.
Caused by:
java.lang.RuntimeException: Failed after 3 tries.
Failure 1: java.lang.RuntimeException: java.io.IOException: Server returned 
HTTP response code: 500 for URL: http://localhost:9873/cmd?id=1336068677185
Failure 2: com.google.jstestdriver.FailureException: Browser is not available
 DEAD:{"id":1336068677185,"name":"Firefox","version":"12.0","os":"Mac OS","uploadSize":50,"serverReceivedHeartbeat":false} 
 for
 {data={"command":"reset","parameters":[]}, id=1336068677185}
Failure 3: java.lang.RuntimeException: java.io.IOException: Server returned 
HTTP response code: 500 for URL: http://localhost:9873/cmd?id=1336068677185
    at com.google.jstestdriver.util.RetryingCallable.call(RetryingCallable.java:62)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: java.io.IOException: Server returned 
HTTP response code: 500 for URL: http://localhost:9873/cmd?id=1336068677185
    at com.google.jstestdriver.HttpServer.fetch(HttpServer.java:54)
    at com.google.jstestdriver.CommandTask.run(CommandTask.java:118)
    at com.google.jstestdriver.JsTestDriverClientImpl.sendCommand(JsTestDriverClientImpl.java:85)
    at com.google.jstestdriver.JsTestDriverClientImpl.runTests(JsTestDriverClientImpl.java:118)
    at com.google.jstestdriver.JsTestDriverClientImpl.runAllTests(JsTestDriverClientImpl.java:99)
    at com.google.jstestdriver.RunTestsAction.run(RunTestsAction.java:61)
    at com.google.jstestdriver.browser.BrowserActionRunner.call(BrowserActionRunner.java:68)
    at com.google.jstestdriver.browser.BrowserActionRunner.call(BrowserActionRunner.java:37)
    at com.google.jstestdriver.browser.BrowserCallable.call(BrowserCallable.java:28)
    at com.google.jstestdriver.util.RetryingCallable.call(RetryingCallable.java:49)
    ... 10 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for 
URL: http://localhost:9873/cmd?id=1336068677185
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
    at com.google.jstestdriver.HttpServer.fetch(HttpServer.java:48)
    ... 19 more

    at com.google.jstestdriver.browser.BrowserActionExecutorAction.run(BrowserActionExecutorAction.java:142)
    at com.google.jstestdriver.ActionRunner.runActions(ActionRunner.java:64)
    at com.google.jstestdriver.JsTestDriver.main(JsTestDriver.java:86)
Caused by:
java.lang.RuntimeException: Failed after 3 tries.
Failure 1: java.lang.RuntimeException: java.io.IOException: Server returned 
HTTP response code: 500 for URL: http://localhost:9873/cmd?id=1336068677185
Failure 2: com.google.jstestdriver.FailureException: Browser is not available
 DEAD:{"id":1336068677185,"name":"Firefox","version":"12.0","os":"Mac OS","uploadSize":50,"serverReceivedHeartbeat":false} 
 for
 {data={"command":"reset","parameters":[]}, id=1336068677185}
Failure 3: java.lang.RuntimeException: java.io.IOException: Server returned 
HTTP response code: 500 for URL: http://localhost:9873/cmd?id=1336068677185
Unexpected Runner Condition: Failures during test run.

What is the expected output? What do you see instead?
I would expect the tests to run to completion since they do without the 
coverage plugin.

What version of the product are you using? On what operating system?
I'm using v1.3.2.5 of the maven plugin, which has v1.3.2 of JSTD. I have tried 
with coverage plugin v1.3.2 and v1.3.4b.

Please provide any additional information below.
This is a very large project, so I have a lot of Javascript being loaded. I 
have ext.js being loaded in my JSTD.conf, but I exclude it from the coverage 
plugin using the 'args' parameter. It was causing much bigger additional 
problems when I included it.

Original issue reported on code.google.com by nateredd...@gmail.com on 3 May 2012 at 6:32