Can't Run Tests in IntelliJ

Answered

When I try to run tests instead of the typical list of tests, I see an error message that says "Test framework quite unexpectedly" as can be seen below. Checking the logs I see the below stack trace. Any idea what is going wrong?

2018-12-24 13:06:33,522 [ 331625] ERROR - ecution.process.ProcessHandler - IntelliJ IDEA 2018.2.7 Build #IU-182.5107.41
2018-12-24 13:06:33,522 [ 331625] ERROR - ecution.process.ProcessHandler - JDK: 1.8.0_152-release
2018-12-24 13:06:33,522 [ 331625] ERROR - ecution.process.ProcessHandler - VM: OpenJDK 64-Bit Server VM
2018-12-24 13:06:33,522 [ 331625] ERROR - ecution.process.ProcessHandler - Vendor: JetBrains s.r.o
2018-12-24 13:06:33,522 [ 331625] ERROR - ecution.process.ProcessHandler - OS: Mac OS X
2018-12-24 13:06:35,164 [ 333267] ERROR - ecution.process.ProcessHandler - null
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:223)
at com.sun.proxy.$Proxy25.onTextAvailable(Unknown Source)
at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:197)
at com.intellij.execution.process.ColoredProcessHandler.textAvailable(ColoredProcessHandler.java:96)
at com.intellij.execution.process.ColoredProcessHandler.coloredTextAvailable(ColoredProcessHandler.java:71)
at com.intellij.execution.process.AnsiEscapeDecoder.processTextChunk(AnsiEscapeDecoder.java:267)
at com.intellij.execution.process.AnsiEscapeDecoder.escapeText(AnsiEscapeDecoder.java:67)
at com.intellij.execution.process.ColoredProcessHandler.notifyTextAvailable(ColoredProcessHandler.java:60)
at com.intellij.execution.process.ProcessTerminatedListener.processTerminated(ProcessTerminatedListener.java:71)
at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:223)
at com.sun.proxy.$Proxy25.processTerminated(Unknown Source)
at com.intellij.execution.process.ProcessHandler$4.run(ProcessHandler.java:180)
at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:256)
at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:161)
at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:157)
at com.intellij.execution.process.KillableProcessHandler.notifyProcessTerminated(KillableProcessHandler.java:134)
at com.intellij.execution.process.BaseProcessHandler.onOSProcessTerminated(BaseProcessHandler.java:61)
at com.intellij.execution.process.OSProcessHandler.onOSProcessTerminated(OSProcessHandler.java:113)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:120)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:105)
at com.intellij.execution.process.ProcessWaitFor$1$1.run(ProcessWaitFor.java:65)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:229)
at com.intellij.execution.process.ProcessWaitFor$1.run(ProcessWaitFor.java:45)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: start 0, end -105, s.length() 1
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:539)
at java.lang.StringBuilder.append(StringBuilder.java:175)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.processConsistentText(OutputToGeneralTestEventsConverter.java:93)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter$1.onLineAvailable(OutputToGeneralTestEventsConverter.java:54)
at com.intellij.execution.testframework.sm.runner.OutputLineSplitter.onChunksAvailable(OutputLineSplitter.java:173)
at com.intellij.execution.testframework.sm.runner.OutputLineSplitter.processLine(OutputLineSplitter.java:90)
at com.intellij.execution.testframework.sm.runner.OutputLineSplitter.process(OutputLineSplitter.java:53)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.process(OutputToGeneralTestEventsConverter.java:72)
at com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil$2.onTextAvailable(SMTestRunnerConnectionUtil.java:211)
... 34 more

 

1
2 comments

Please tell if the issue is reproduced for you with 2018.3.2 IDEA version: https://www.jetbrains.com/idea/download?

Can you please provide code sample to reproduce the issue and check the related issues at YouTrack for solution:

https://youtrack.jetbrains.com/issue/IDEA-201376;

https://youtrack.jetbrains.com/issues/IDEA?q=Test%20framework%20quit%20unexpectedly

 

 

 

 

1
Avatar
Permanently deleted user

After checking out the first link you posted, I tried the suggestion of setting the "Override console cycle buffer size" option back to the default. This (for some super weird reason) fixed the problem. I can now successfully run tests.

2

Please sign in to leave a comment.