vladblaj / testng-idea

Automatically exported from code.google.com/p/testng-idea
0 stars 0 forks source link

TestNG-J plugin blows up with StringIndexOutOfBoundsException #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install TestNG-J plugin 1.0.7 in Idea 6.
2. Running certain tests always always makes plugin blow up.  Problem began
suddenly with upgrade of TestNG-J plugin to 1.0.7.
3. Status of tests begin run in lefthand pane don't match status being
display in right

What is the expected output? What do you see instead?
I expect the test to complete.  Instead it just runs forever and Idea warns
me that TestNG-J has caused a fatal error.

What version of the product are you using? On what operating system?
Idea 6 (build 6180) on Linux (Fedora Core 6) with JDK 1.5.0_11 and TestNG-J
plugin 1.0.7.

Please provide any additional information below.

String index out of range: -824
java.lang.StringIndexOutOfBoundsException: String index out of range: -824
    at java.lang.String.substring(String.java:1768)
    at
com.theoryinpractice.testng.TestNGConsoleView.getPrintables(TestNGConsoleView.ja
va:147)
    at
com.theoryinpractice.testng.TestNGConsoleView.addTestResult(TestNGConsoleView.ja
va:65)
    at
com.theoryinpractice.testng.model.TestNGRemoteListener.onTestFailure(TestNGRemot
eListener.java:47)
    at
com.theoryinpractice.testng.model.IDEARemoteTestRunnerClient$5.run(IDEARemoteTes
tRunnerClient.java:88)
    at
com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:4
)
    at
com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocat
or.java:15)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:126)
    at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:153)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:124)
    at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
42)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163
)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

java.lang.StringIndexOutOfBoundsException: String index out of range: -824
    at java.lang.String.substring(String.java:1768)
    at
com.theoryinpractice.testng.TestNGConsoleView.getPrintables(TestNGConsoleView.ja
va:147)
    at
com.theoryinpractice.testng.TestNGConsoleView.addTestResult(TestNGConsoleView.ja
va:65)
    at
com.theoryinpractice.testng.model.TestNGRemoteListener.onTestFailure(TestNGRemot
eListener.java:47)
    at
com.theoryinpractice.testng.model.IDEARemoteTestRunnerClient$5.run(IDEARemoteTes
tRunnerClient.java:88)
    at
com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:4
)
    at
com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocat
or.java:15)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:126)
    at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:153)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:124)
    at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
42)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163
)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Original issue reported on code.google.com by rktoo...@gmail.com on 7 Jun 2007 at 4:01

Attachments:

GoogleCodeExporter commented 9 years ago
I looked at the source for TestNGConsoleView and it looks like the problem is 
in the
code that deals with scrolling to text in the 'output' tab when the test tree 
is clicked.

Workaround:  Do less logging!   Eliminating log output seems to make the 
problem less
likely to happen.

Original comment by jdavis20...@yahoo.com on 7 Jun 2007 at 4:20