JDK-6934585 : TEST_BUG: java/nio/channels/AsynchronousSocketChannel/Basic.java
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-03-12
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b100Fixed
Description
problems with this test on Solaris 10 X86 and Fedora 9 32bit.

--------------------------------------------------
TEST: java/nio/channels/AsynchronousSocketChannel/Basic.java
JDK under test: (/tmp/jprt/P1/T/173102.ohair/testproduct/solaris_i586_5.10-product)
openjdk version "1.7.0-2010-03-11-173102.ohair.jdk"
OpenJDK Runtime Environment (build 1.7.0-2010-03-11-173102.ohair.jdk-jprtadm_2010_03_11_09_40-b00)
Java HotSpot(TM) Server VM (build 17.0-b10, mixed mode)

ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.89 seconds
messages:
command: build Basic
reason: Named class compiled on demand
elapsed time (seconds): 0.89

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.89 seconds
messages:
command: compile /tmp/jprt/P1/T/173102.ohair/source/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.89
STDOUT:
STDERR:

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Should not connect
REASON: User specified action: run main/timeout=600 Basic
TIME:   4.007 seconds
messages:
command: main Basic
reason: User specified action: run main/timeout=600 Basic
elapsed time (seconds): 4.007
STDOUT:
-- bind --
-- socket options --
-- connect --
-- connect to non-existent host --
-- asynchronous close when connecting --
STDERR:
java.lang.RuntimeException: Should not connect
	at Basic.testCloseWhenPending(Basic.java:238)
	at Basic.main(Basic.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Should not connect
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Should not connect

TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Should not connect
--------------------------------------------------

--------------------------------------------------
TEST: java/nio/channels/AsynchronousSocketChannel/Basic.java
JDK under test: (/tmp/jprt/P1/T/173102.ohair/testproduct/linux_i586_2.6-product)
openjdk version "1.7.0-2010-03-11-173102.ohair.jdk"
OpenJDK Runtime Environment (build 1.7.0-2010-03-11-173102.ohair.jdk-jprtadm_2010_03_11_09_41-b00)
Java HotSpot(TM) Server VM (build 17.0-b10, mixed mode)

ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.85 seconds
messages:
command: build Basic
reason: Named class compiled on demand
elapsed time (seconds): 0.85

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.85 seconds
messages:
command: compile /tmp/jprt/P1/T/173102.ohair/source/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.85
STDOUT:
STDERR:

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Connection should not be established
REASON: User specified action: run main/timeout=600 Basic
TIME:   10.574 seconds
messages:
command: main Basic
reason: User specified action: run main/timeout=600 Basic
elapsed time (seconds): 10.574
STDOUT:
-- bind --
-- socket options --
-- connect --
-- connect to non-existent host --
STDERR:
java.lang.RuntimeException: Connection should not be established
	at Basic.testConnect(Basic.java:206)
	at Basic.main(Basic.java:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:717)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Connection should not be established
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Connection should not be established

TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Connection should not be established
--------------------------------------------------

Comments
EVALUATION Need to fix this test so that it doesn't assume that connections to 1.2.3.4 fail and that the failure is not immediate.
10-06-2010