-
Notifications
You must be signed in to change notification settings - Fork 25
WARN com.github.timurstrekalov.saga.core.TestRunCoverageStatisticsCallable - Error running test ... null #121
Comments
Here's my full log (with stack trace output added): [INFO] --- saga-maven-plugin:1.5.3:coverage (default) @ healthcare --- |
I have to wonder if some of my code is the culprit making the list change size. In particular I have code like this:
Note that it injects a script into the dom. My coverage reports seem to be printed out correctly more often if I comment out all that code. |
I get blank coverage reports quite often. I took a look at the warning above and dug around a bit. The exception message isn't helpful since it's null. So I modified the source to output a stack trace as well:
[java.util.LinkedList$ListItr.next(LinkedList.java:891)
com.github.timurstrekalov.saga.core.TestRunCoverageStatisticsCallable.collectAndWriteRunStats(TestRunCoverageStatisticsCallable.java:90)
com.github.timurstrekalov.saga.core.TestRunCoverageStatisticsCallable.runTest(TestRunCoverageStatisticsCallable.java:79)
com.github.timurstrekalov.saga.core.TestRunCoverageStatisticsCallable.call(TestRunCoverageStatisticsCallable.java:39)
com.github.timurstrekalov.saga.core.TestRunCoverageStatisticsCallable.call(TestRunCoverageStatisticsCallable.java:18)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
java.util.concurrent.FutureTask.run(FutureTask.java:166)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
java.util.concurrent.FutureTask.run(FutureTask.java:166)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:724)]
The trace tells me that TestRunCoverageStatisticsCallable.collectAndWriteRunStats is failing on line 90. In particular getLocalBrowser().getScriptDataList() is returning a List that is changing/modifiying the underlying list in another thread (or perhaps in the for loop itself).
I haven't been able to debug why it's changing yet. But I put a placeholder fix to solve the problem on my local machine for now.
try {
Thread.sleep(8000);
} catch (Exception e) {}
for (final ScriptData data : getLocalBrowser().getScriptDataList()) {
I just added a sleep before that iterator. So far that seems to work. Which would imply someone else is modifying the list, and not the for loop itself. No way for me to know for sure without more time to debug.
The text was updated successfully, but these errors were encountered: