Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 2.2 M3 Sprint 1
-
Component/s: TCP/UDP Support, Testing
-
Labels:
-
Environment:OS:
Mac OS X Lion 10.7.4 (11E53)
JDK:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3646)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
Description
The test method that is passing/failing inconsistently is testRealNio.
I first noticed the problem when running the Gradle build from the root of SI. When doing that, the test almost always fails. I then isolated to just this class using -Dtest.single. That will occasionally pass, but not consistently.
When running inside of Eclipse, if I run only the class in question, it will almost always pass. If however, I run all of the tests inside of spring-integration-ip, it will often times fail.
Now here's the killer...last night, when all of this was happening, JIRA was down, so I couldn't file the issue. Now, this morning, I can't get the test to fail (first time that's happened). I will try again in the evening as I have an opportunity to see if this is some sort of time-based issue.
I was able to find this in a browser tab...it is present only when the test fails:
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)
at sun.nio.ch.IOUtil.read(IOUtil.java:171)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
at org.springframework.integration.ip.tcp.connection.TcpNioConnection.doRead(TcpNioConnection.java:286)
at org.springframework.integration.ip.tcp.connection.TcpNioConnection.readPacket(TcpNioConnection.java:358)
at org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory$1.run(AbstractConnectionFactory.java:575)
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)
Sorry for the lack of info.