Harmony
  1. Harmony
  2. HARMONY-6365

[classlib][luni]UnixSocketTest.test_getInputStream may fail because server close the socket before the client read the data

    Details

    • Type: Test Test
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M12
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      z/OS
    • Patch Info:
      Patch Available

      Description

      UnixSocketTest.test_getInputStream failed intermittently, because server close the socket before client read the data.

      Failed at line 79 when the client try to read the data, and got a java.net.SocketException: The connection was reset error.

      1. 6365.v2.diff
        4 kB
        Regis Xu
      2. 6365.diff
        1 kB
        Ray Chen

        Activity

        Hide
        Ray Chen added a comment -

        In the patch, make the server thread sleep for a while so that make sure client has enough time to read the data.

        Show
        Ray Chen added a comment - In the patch, make the server thread sleep for a while so that make sure client has enough time to read the data.
        Hide
        Regis Xu added a comment -

        Hi Ray,

        How about the patch 6365.v2.diff. It only use one thread for testing, so it should not have timing issue here.

        Show
        Regis Xu added a comment - Hi Ray, How about the patch 6365.v2.diff. It only use one thread for testing, so it should not have timing issue here.
        Hide
        Ray Chen added a comment -

        Hi Regis,

        Yep, v2 is much better, please commit it to repository.

        Thank you.


        Regards,

        Ray Chen

        Show
        Ray Chen added a comment - Hi Regis, Yep, v2 is much better, please commit it to repository. Thank you. – Regards, Ray Chen
        Hide
        Regis Xu added a comment -

        Hi Ray,

        Patch was applied at r832360, please verify it worked on zos. Thanks.

        Show
        Regis Xu added a comment - Hi Ray, Patch was applied at r832360, please verify it worked on zos. Thanks.
        Hide
        Hudson added a comment -

        Integrated in Harmony-1.5-head-linux-x86_64 #522 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/522/)
        Apply patch for : [classlib][luni]UnixSocketTest.test_getInputStream may fail because server close the socket before the client read the data

        Show
        Hudson added a comment - Integrated in Harmony-1.5-head-linux-x86_64 #522 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/522/ ) Apply patch for : [classlib] [luni] UnixSocketTest.test_getInputStream may fail because server close the socket before the client read the data

          People

          • Assignee:
            Regis Xu
            Reporter:
            Ray Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development