TestNG 6.4 apparently breaks the IntelliJ IDEA TestNG plugin

1,641 views
Skip to first unread message

Rogerio

unread,
Feb 24, 2012, 10:50:38 AM2/24/12
to testng-dev
Hello,

While upgrading the JMockit project to use TestNG 6.4, I noticed that
when running the test suites with IDEA 11, an exception is always
thrown (below). IDEA reports "All Tests Passed", but without showing
the tree with individual tests.

java.net.SocketException: Software caused connection abort: socket
write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:
92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.ObjectOutputStream
$BlockDataOutputStream.drain(ObjectOutputStream.java:1847)
at java.io.ObjectOutputStream
$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1756)
at
java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:
1257)
at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:
1211)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
1395)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
1158)
at
java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:
1547)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
333)
at
org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:
25)
at
org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:
44)
at
org.testng.remote.strprotocol.RemoteTestListener.onTestSuccess(RemoteTestListener.java:
92)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1888)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1868)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:774)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:893)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1218)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:
127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:
111)
at org.testng.TestRunner.privateRun(TestRunner.java:758)
at org.testng.TestRunner.run(TestRunner.java:613)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1170)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1095)
at org.testng.TestNG.run(TestNG.java:1007)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:
120)

This happens with two different test suites. Executing them with Ant
or with Maven, however, still works fine. So, the problem appears to
be only with the IDEA plugin.

Cédric Beust ♔

unread,
Feb 24, 2012, 10:52:15 AM2/24/12
to testn...@googlegroups.com
Known issue:


-- 
Cédric





--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testn...@googlegroups.com.
To unsubscribe from this group, send email to testng-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en.


Maksim Khadkevich

unread,
Mar 25, 2012, 9:03:07 AM3/25/12
to testng-dev
TestNG 6.3 does not have the above described problem with the latest
intelliJ idea 11.0.2 . The solution could be a downgrade.

On Feb 24, 5:52 pm, Cédric Beust ♔ <ced...@beust.com> wrote:
> Known issue:
>
> http://groups.google.com/group/testng-users/browse_thread/thread/e194...

Mark Derricutt

unread,
Mar 25, 2012, 3:41:52 PM3/25/12
to testn...@googlegroups.com
This is now fixed in the current 11.1 RC builds.

See https://plus.google.com/113913703302067206043/posts/Qf5iScv8Gst for
screenshots of what you now see when using 6.4.

Ivan Hrytsyuk

unread,
Mar 30, 2012, 3:41:10 PM3/30/12
to testng-dev
Just upgraded to IDEA-11.1.1 and could see the dialog from your
screenshot. Pressed button 'copy' and now all tests hang without any
messages.

Cédric Beust ♔

unread,
Mar 30, 2012, 7:22:31 PM3/30/12
to testn...@googlegroups.com
You might want to post this in the IDEA forums.

-- 
Cédric




Mark Derricutt

unread,
Mar 30, 2012, 7:41:08 PM3/30/12
to testn...@googlegroups.com, Ivan Hrytsyuk
I noticed this myself last night with the final release, looks like
something regressed :(

Time to hit the forums :(

Cédric Beust ♔

unread,
Mar 30, 2012, 7:52:05 PM3/30/12
to testn...@googlegroups.com, Ivan Hrytsyuk
Please post a link to the discussion once it's started...

Thanks!

-- 
Cédric




--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testn...@googlegroups.com.
To unsubscribe from this group, send email to testng-dev+unsubscribe@googlegroups.com.

Mark Derricutt

unread,
Mar 30, 2012, 8:32:09 PM3/30/12
to testn...@googlegroups.com, Ivan Hrytsyuk, Cédric Beust ♔
Is this actually a problem?

I was 1/2 way thru writing a post to the forum about it, and went to
confirm the problem, and couldn't reproduce it on the 118.103 build I'm
using, so then downloaded the 117.117 release ( The final 11.1.1
release ) and that seems to also work fine.

The first time I ran my tests they ran using the internal version of
TestNG and I received the message about compatibility issues, clicked
the 'copy' button and restarted IDEA and the tests then ran as normal,
without the error message.

This was on OSX..... Ivan - did you restart IDEA like it prompts or
did you choose "postpone"? Also, what OS are running on?

I did see this problem on a build earlier in the week, but I'm unable
to reproduce with the current release version...

I'll hold off submitting this post to the Jetbrains forums till I here
back from others?

Cédric Beust ♔

unread,
Mar 31, 2012, 12:12:55 AM3/31/12
to Mark Derricutt, testn...@googlegroups.com, Ivan Hrytsyuk
Somebody else will have to confirm whether this is a problem or not, the only times I ever use IDEA is for writing Kotlin code :-)

-- 
Cédric

Ivan Hrytsyuk

unread,
Mar 31, 2012, 2:35:32 PM3/31/12
to testng-dev
Yes I did restart IDEA.
After I had read your post I started thinking that the problem is
related with updating from IDEA 11.1 to 11.1.1 via Jetbrains patch.
So I decided to download 11.1.1 version from Jetbrains site and
install it from the scratch.

Here are my steps:
1. install 11.1.1 version
2. run single test with TestNG-6.3
3. update my pom.xml to use TestNG-6.4 and re-run the same test
4. The mentioned dialog appeared. Click copy.
5. Restarted IDEA
6. Run the test - and it hangs again. Took thread dump of JVM (is
placed at the end)
7. Downgraded to TestNG-6.3 - but the test still hangs.

Looks like the only way to have TestNG working again is to re-install
IDEA :(

My environment: Win7 32 bit, JDK 6.0_27

My test:
@Test
public void testNull() {
Assert.assertNotNull(new Object());
}

Dump of main thread:
"main" prio=6 tid=0x01a91c00 nid=0xf24 runnable [0x001bf000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
- locked <0x23e5f600> (a java.net.SocksSocketImpl)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:
213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at
org.testng.remote.strprotocol.BaseMessageSender.connect(BaseMessageSender.java:
58)
at org.testng.remote.strprotocol.MessageHub.connect(MessageHub.java:
32)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:84)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:
120)

Anna Kozlova

unread,
Apr 1, 2012, 8:04:34 AM4/1/12
to testn...@googlegroups.com
Ivan, could you please check what is the version of the testng.jar in
the IDEA_INSTALLATION_FOLDER/plugins/testng/lib after the copy? If it
is 6.4, please check the command line which was used by IDEA to run
tests: it should containg testng6.4 jar. Otherwise (with testng6.3)
the same incompatibility problem arise.
Anna

> --
> You received this message because you are subscribed to the Google Groups "testng-dev" group.
> To post to this group, send email to testn...@googlegroups.com.

> To unsubscribe from this group, send email to testng-dev+...@googlegroups.com.

Ivan Hrytsyuk

unread,
Apr 1, 2012, 5:15:29 PM4/1/12
to testn...@googlegroups.com
Neither 6.4 nor 6.3.
There is no version info in the testng.jar manifest file. But when I replaced those jar file with testng-6.3.jar - 'Run Test' context menu item disappeared in IDEA.
Also nothing changed (i.e. the test still hang) when I added testng-6.3.jar to IDEA_INSTALLATION_FOLDER/plugins/testng/lib/ directory so both initial testng.jar and new testng-6.3.jar are present there.

Command line (without the testng-6.3.jar) is next: C:\Java\jdk1.6.0_27\bin\java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 11.1.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 11.1.1\plugins\testng\lib\testng.jar;C:\Program Files\JetBrains\IntelliJ IDEA 11.1.1\plugins\testng\lib\testng-jdk15.jar;C:\Java\jdk1.6.0_27\jre\lib\charsets.jar;C:\Java\jdk1.6.0_27\jre\lib\deploy.jar;C:\Java\jdk1.6.0_27\jre\lib\javaws.jar;C:\Java\jdk1.6.0_27\jre\lib\jce.jar;C:\Java\jdk1.6.0_27\jre\lib\jsse.jar;C:\Java\jdk1.6.0_27\jre\lib\management-agent.jar;C:\Java\jdk1.6.0_27\jre\lib\plugin.jar;C:\Java\jdk1.6.0_27\jre\lib\resources.jar;C:\Java\jdk1.6.0_27\jre\lib\rt.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\dnsns.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\localedata.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\sunjce_provider.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\sunmscapi.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\sunpkcs11.jar;J:\VOVA\trunk\target\test-classes;J:\VOVA\trunk\target\classes;C:\Users\ihrytsyuk\.m2\repository\com\ihrytsyuk\http-core\1.0\http-core-1.0.jar;C:\Users\ihrytsyuk\.m2\repository\org\apache\httpcomponents\httpclient\4.1.2\httpclient-4.1.2.jar;C:\Users\ihrytsyuk\.m2\repository\org\apache\httpcomponents\httpcore\4.1.2\httpcore-4.1.2.jar;C:\Users\ihrytsyuk\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\ihrytsyuk\.m2\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;C:\Users\ihrytsyuk\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar;C:\Users\ihrytsyuk\.m2\repository\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar;C:\Users\ihrytsyuk\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar;C:\Users\ihrytsyuk\.m2\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;C:\Users\ihrytsyuk\.m2\repository\org\jasypt\jasypt\1.7\jasypt-1.7.jar;C:\Users\ihrytsyuk\.m2\repository\org\apache\commons\commons-lang3\3.0.1\commons-lang3-3.0.1.jar;C:\Users\ihrytsyuk\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.8.5\jackson-mapper-asl-1.8.5.jar;C:\Users\ihrytsyuk\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.8.5\jackson-core-asl-1.8.5.jar;C:\Users\ihrytsyuk\.m2\repository\junit\junit\4.8.1\junit-4.8.1.jar;C:\Users\ihrytsyuk\.m2\repository\org\testng\testng\6.3\testng-6.3.jar;C:\Users\ihrytsyuk\.m2\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar;C:\Users\ihrytsyuk\.m2\repository\com\beust\jcommander\1.12\jcommander-1.12.jar;C:\Users\ihrytsyuk\.m2\repository\org\yaml\snakeyaml\1.6\snakeyaml-1.6.jar;C:\Users\ihrytsyuk\.m2\repository\net\sf\jtidy\jtidy\r938\jtidy-r938.jar;C:\Program Files\JetBrains\IntelliJ IDEA 11.1.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.testng.RemoteTestNGStarter -serport 50195 -usedefaultlisteners false -socket50196 -temp C:\Users\ihrytsyuk\AppData\Local\Temp\idea_testng3140112019025290114.tmp

2012/4/1 Anna Kozlova <anna.m....@gmail.com>

Mark Derricutt

unread,
Apr 1, 2012, 5:51:52 PM4/1/12
to testn...@googlegroups.com
Did you replace testng.jar or testng-jdk15.jar - the first file is the
plugin itself NOT testng. The naming of that jar could probably be
improved to clearly identify that its the plugin.

On Mon Apr 2 09:15:29 2012, Ivan Hrytsyuk wrote:
> Neither 6.4 nor 6.3.
> There is no version info in the testng.jar manifest file. But when I
> replaced those jar file with testng-6.3.jar - 'Run Test' context menu
> item disappeared in IDEA.

> Also *nothing changed* (i.e. the test still hang) when I added

> testng-6.3.jar to IDEA_INSTALLATION_FOLDER/plugins/testng/lib/
> directory so both initial testng.jar and new testng-6.3.jar are
> present there.
>
> Command line (without the testng-6.3.jar) is next:
> C:\Java\jdk1.6.0_27\bin\java -Didea.launcher.port=7532
> "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA
> 11.1.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program
> Files\JetBrains\IntelliJ IDEA
> 11.1.1\plugins\testng\lib\testng.jar;C:\Program
> Files\JetBrains\IntelliJ IDEA
> 11.1.1\plugins\testng\lib\testng-jdk15.jar;C:\Java\jdk1.6.0_27\jre\lib\charsets.jar;C:\Java\jdk1.6.0_27\jre\lib\deploy.jar;C:\Java\jdk1.6.0_27\jre\lib\javaws.jar;C:\Java\jdk1.6.0_27\jre\lib\jce.jar;C:\Java\jdk1.6.0_27\jre\lib\jsse.jar;C:\Java\jdk1.6.0_27\jre\lib\management-agent.jar;C:\Java\jdk1.6.0_27\jre\lib\plugin.jar;C:\Java\jdk1.6.0_27\jre\lib\resources.jar;C:\Java\jdk1.6.0_27\jre\lib\rt.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\dnsns.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\localedata.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\sunjce_provider.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\sunmscapi.jar;C:\Java\jdk1.6.0_27\jre\lib\ext\sunpkcs11.jar;J:\VOVA\trunk\target\test-classes;J:\VOVA\trunk\target\classes;C:\Users\ihrytsyuk\.m2\repository\com\ihrytsyuk\http-core\1.0\http-core-1.0.jar;C:\Users\ihrytsyuk\.m2\repository\org\apache\httpcomponents\httpclient\4.1.2\httpclient-4.1.2.jar;C:\Users\ihrytsyuk\.m2\repository\org\apache\httpcomponents\httpcore\4.1.2\httpcore-4.1.2.jar;C:\Users\ihrytsyuk\.m2\reposi
tory\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\ihrytsyuk\.m2\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;C:\Users\ihrytsyuk\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar;C:\Users\ihrytsyuk\.m2\repository\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar;C:\Users\ihrytsyuk\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar;C:\Users\ihrytsyuk\.m2\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;C:\Users\ihrytsyuk\.m2\repository\org\jasypt\jasypt\1.7\jasypt-1.7.jar;C:\Users\ihrytsyuk\.m2\repository\org\apache\commons\commons-lang3\3.0.1\commons-lang3-3.0.1.jar;C:\Users\ihrytsyuk\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.8.5\jackson-mapper-asl-1.8.5.jar;C:\Users\ihrytsyuk\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.8.5\jackson-core-asl-1.8.5.jar;C:\Users\ihrytsyuk\.m2\repository\junit\junit\4.8.1\junit-4.8.1.jar;C:\Users\ihrytsyuk\.m2\repository\org\testng\testng\6.3\testng-6.3.jar;C:\U
sers\ihrytsyuk\.m2\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar;C:\Users\ihrytsyuk\.m2\repository\com\beust\jcommander\1.12\jcommander-1.12.jar;C:\Users\ihrytsyuk\.m2\repository\org\yaml\snakeyaml\1.6\snakeyaml-1.6.jar;C:\Users\ihrytsyuk\.m2\repository\net\sf\jtidy\jtidy\r938\jtidy-r938.jar;C:\Program
> Files\JetBrains\IntelliJ IDEA 11.1.1\lib\idea_rt.jar"
> com.intellij.rt.execution.application.AppMain
> org.testng.RemoteTestNGStarter -serport 50195 -usedefaultlisteners
> false -socket50196 -temp
> C:\Users\ihrytsyuk\AppData\Local\Temp\idea_testng3140112019025290114.tmp
>
> 2012/4/1 Anna Kozlova <anna.m....@gmail.com

> <mailto:anna.m....@gmail.com>>

> > To post to this group, send email totest...@googlegroups.com <mailto:testn...@googlegroups.com>.
> > To unsubscribe from this group, send email totestng-dev...@googlegroups.com
> <mailto:testng-dev%2Bunsu...@googlegroups.com>.
> > For more options, visit this group athttp://groups.google.com/group/testng-dev?hl=en.


> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "testng-dev" group.
> To post to this group, send email to testn...@googlegroups.com

> <mailto:testn...@googlegroups.com>.


> To unsubscribe from this group, send email to
> testng-dev+...@googlegroups.com

> <mailto:testng-dev%2Bunsu...@googlegroups.com>.

Ivan Hrytsyuk

unread,
Apr 2, 2012, 2:12:03 PM4/2/12
to testng-dev
On Ubuntu-10.10 machine all works like a charm.

After I had pressed Copy button I noticed that it updated testng-
jdk15.jar. Before click it was 1.2 MB in size, after click - 1.3 MB.
It's obvious that issue can be reproduced only on Windows machines
because Windows keeps that jar locked.

Ivan Hrytsyuk

unread,
Apr 2, 2012, 4:26:18 PM4/2/12
to testng-dev
A little update: after I copied new version of testng-jdk15.jar from
Linux to Windows 7 - everything works fine on Win7.
Reply all
Reply to author
Forward
0 new messages