You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2006/07/05 05:36:29 UTC

[jira] Created: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

[classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
-------------------------------------------------------------------------------

         Key: HARMONY-755
         URL: http://issues.apache.org/jira/browse/HARMONY-755
     Project: Harmony
        Type: Test

  Components: Classlib  
    Reporter: Andrew Zhang


Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 

There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.

1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 

2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.

I'll upload a patch soon.

Thanks!

Best regards,
Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]

George Harley reassigned HARMONY-755:
-------------------------------------

    Assign To: George Harley

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]
     
George Harley reopened HARMONY-755:
-----------------------------------


Hi Andrew, 

Re-opening as the updated tests are consistently failing on Linux (Debian). I have backed out the changes for now. The JUnit error messages are as follows (line numbers are obviously for SocketChannelTest with the patch applied) ...

1) 
java.net.ConnectException: Connection refused at org.apache.harmony.luni.platform.OSNetworkSystem.connectWithTimeoutSocketImpl(Native Method) at org.apache.harmony.luni.platform.OSNetworkSystem.connectWithTimeout(OSNetworkSystem.java:110) at org.apache.harmony.nio.internal.SocketChannelImpl.finishConnect(SocketChannelImpl.java:339) at org.apache.harmony.tests.java.nio.channels.SocketChannelTest.testCFII_Data_FinishConnect_AddrSetServerStartLater(SocketChannelTest.java:1600) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)


2)
java.net.ConnectException: Connection refused at org.apache.harmony.luni.platform.OSNetworkSystem.connectWithTimeoutSocketImpl(Native Method) at org.apache.harmony.luni.platform.OSNetworkSystem.connectWithTimeout(OSNetworkSystem.java:110) at org.apache.harmony.nio.internal.SocketChannelImpl.finishConnect(SocketChannelImpl.java:339) at org.apache.harmony.tests.java.nio.channels.SocketChannelTest.testCFII_Data_FinishConnect_ServerStartLater(SocketChannelTest.java:1658) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)


The tests work fine on Windows XP. Please could you investigate ?

Best regards, 
George


> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-755?page=comments#action_12419941 ] 

Andrew Zhang commented on HARMONY-755:
--------------------------------------

Hello George,

The fix looks good. Many thanks!

Best regards,
Andrew

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff, nio_updated.diff, nio_updated_post_782.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]

Mark Hindess updated HARMONY-755:
---------------------------------

    Attachment: nio_updated_post_782.diff

Fixed patch metadata in light on HARMONY-782 moves.


> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff, nio_updated.diff, nio_updated_post_782.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]
     
George Harley resolved HARMONY-755:
-----------------------------------

    Resolution: Fixed

Hi Andrew, 

Second patch committed in revision 419866. Please could you verify that it has been applied as expected. 

Best regards,
George



> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff, nio_updated.diff, nio_updated_post_782.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]
     
George Harley resolved HARMONY-755:
-----------------------------------

    Resolution: Fixed

Hi Andrew, 

Patch committed in revision 419222. Please could you verify that it has been applied as expected. 

Many thanks, 
George

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]

Andrew Zhang updated HARMONY-755:
---------------------------------

    Attachment: nio_updated.diff

Hello George,

Please try nio_update.diff. 

In this patch, I removed the unrelated test from SocketChannelTest.

Thanks!

Best regards,
Andrew

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff, nio_updated.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]

Andrew Zhang updated HARMONY-755:
---------------------------------

    Attachment: nio.diff

Hello, 

Would you please try my patch?

Thanks!

Best regards,
Andrew

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>  Attachments: nio.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-755?page=all ]
     
George Harley closed HARMONY-755:
---------------------------------


Verified by Andrew.

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff, nio_updated.diff, nio_updated_post_782.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-755?page=comments#action_12419385 ] 

Andrew Zhang commented on HARMONY-755:
--------------------------------------

Hello George,

The problem was found. 

It's caused by different platform behaviours of SocketChannel.connect() and finishConnect(). 

There are 8 FIXMEs  in SocketChannel about this issue. The FIXME looks like:

"// FIXME: assertEquals(e.getMessage(), "Connection refused");"

I have noticed it before. But for my careless, I forgot this issue during refining these tests.

For these FIXMEs, I have to wait for test structure layout, or some other control methods for platform dependent test.

So I'll leave these FIXMEs as original, and upload a new patch to remove the unrelated test "testConnect_Lock". 

Really sorry for my mistakes.  

Best regards,
Andrew

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-755) [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest

Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-755?page=comments#action_12419376 ] 

Andrew Zhang commented on HARMONY-755:
--------------------------------------

Hello George,

Sorry for the failure. I'll take a look right away.

Thanks!

Best regards,
Andrew

> [classlib][nio] Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest
> -------------------------------------------------------------------------------
>
>          Key: HARMONY-755
>          URL: http://issues.apache.org/jira/browse/HARMONY-755
>      Project: Harmony
>         Type: Test

>   Components: Classlib
>     Reporter: Andrew Zhang
>     Assignee: George Harley
>  Attachments: nio.diff
>
> Refine tests in o.a.h.tests.java.nio.channels.SocketChannelTest. 
> There are some system.err/out and bad tests in SocketChannelTest. I'll fix some of them in this patch.
> 1. testConnect_Lock. This method has nothing to do with SocketChannel, and it always output some logs to stdout. I'll remove this method.  In fact, it tests something about Socket, not SocketChannel. 
> 2. Fix system.out/err in testCFII_Data_FinishConnect_ServerStartLater, testCFII_Data_FinishConnect_AddrSetServerStartLater.
> I'll upload a patch soon.
> Thanks!
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira