Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-1664

[classlib][net] InetAddressTest.test_getHostName() fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      Linux, IBM VME v4

      Description

      I observe for fairly long the following failure:

      junit.framework.ComparisonFailure: expected:<127.0.0.1> but was:<localhost>
      at tests.api.java.net.InetAddressTest.test_getHostName(InetAddressTest.java:252)
      at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)

      Seems that the test should be made more robust.

      1. HARMONY-1664-InetAddressTest.patch
        2 kB
        Denis Kishenko
      2. luni.sh
        0.4 kB
        Alexei Fedotov

        Issue Links

          Activity

          Show
          leshik Alexei Fedotov added a comment - [drlvm] [unit] Blocks http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM The issue is close to https://issues.apache.org/jira/browse/HARMONY-1752
          Hide
          oleg.v.khaschansky@gmail.com Oleg Khaschansky added a comment -

          This issue is not reproducible with drlvm r454444. I also observed an InterruptedException in this test but it is unrelated threading issue which was fixed after applying patches from #1823 and #1816.

          Show
          oleg.v.khaschansky@gmail.com Oleg Khaschansky added a comment - This issue is not reproducible with drlvm r454444. I also observed an InterruptedException in this test but it is unrelated threading issue which was fixed after applying patches from #1823 and #1816.
          Hide
          paulex Paulex Yang added a comment -

          Oleg, thank you for looking at this.

          Alexey, please to verify that if this issue still exists or not, thank you.

          Show
          paulex Paulex Yang added a comment - Oleg, thank you for looking at this. Alexey, please to verify that if this issue still exists or not, thank you.
          Hide
          elena Elena Semukhina added a comment -

          This test fails for me on Widows 2003 server with H-1816, 1823 applied (which eliminate InterruptedException).
          3 test cases fail in the following way:

          test_getByNameLjava_lang_String Failure null

          junit.framework.AssertionFailedError: null at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:14) at tests.api.java.net.InetAddressTest.test_getByNameLjava_lang_String(InetAddressTest.java:207) at java.lang.reflect.VMReflection.invokeMethod(Native Method)

          test_getHostName Failure null

          junit.framework.AssertionFailedError: null at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:14) at tests.api.java.net.InetAddressTest.test_getHostName(InetAddressTest.java:240) at java.lang.reflect.VMReflection.invokeMethod(Native Method)

          test_getCanonicalHostName Failure null

          junit.framework.AssertionFailedError: null at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:14) at tests.api.java.net.InetAddressTest.test_getCanonicalHostName(InetAddressTest.java:412) at java.lang.reflect.VMReflection.invokeMethod(Native Method

          Show
          elena Elena Semukhina added a comment - This test fails for me on Widows 2003 server with H-1816, 1823 applied (which eliminate InterruptedException). 3 test cases fail in the following way: test_getByNameLjava_lang_String Failure null junit.framework.AssertionFailedError: null at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:14) at tests.api.java.net.InetAddressTest.test_getByNameLjava_lang_String(InetAddressTest.java:207) at java.lang.reflect.VMReflection.invokeMethod(Native Method) test_getHostName Failure null junit.framework.AssertionFailedError: null at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:14) at tests.api.java.net.InetAddressTest.test_getHostName(InetAddressTest.java:240) at java.lang.reflect.VMReflection.invokeMethod(Native Method) test_getCanonicalHostName Failure null junit.framework.AssertionFailedError: null at junit.framework.AssertionFailedError.<init>(AssertionFailedError.java:14) at tests.api.java.net.InetAddressTest.test_getCanonicalHostName(InetAddressTest.java:412) at java.lang.reflect.VMReflection.invokeMethod(Native Method
          Hide
          leshik Alexei Fedotov added a comment -

          This is an example script which runs tests from LUNI module in a loop and collects a log. It helps reproducing intermittent problems.

          Show
          leshik Alexei Fedotov added a comment - This is an example script which runs tests from LUNI module in a loop and collects a log. It helps reproducing intermittent problems.
          Hide
          leshik Alexei Fedotov added a comment -
          Show
          leshik Alexei Fedotov added a comment - The bug is still reproducible with patches, mentioned by Oleg. See my mail from http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c8E389A5F2FEABA4CB1DEC35A25CB39CE593857@mssmsx411%3e
          Hide
          paulex Paulex Yang added a comment -

          Still reproducible.

          Show
          paulex Paulex Yang added a comment - Still reproducible.
          Show
          leshik Alexei Fedotov added a comment - See http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200602.mbox/%3C43EC2AA4.7040801@gmail.com%3E
          Hide
          dkishenko Denis Kishenko added a comment -

          During disscussion it was diccided to comment assert which fail tests (only concern "localhost").
          http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c834b3bd50610190444q51af279cn23a8b83834bf2c41@mail.gmail.com%3e

          Following tests were changed
          test_getByNameLjava_lang_String
          test_getHostName
          test_getCanonicalHostName

          Show
          dkishenko Denis Kishenko added a comment - During disscussion it was diccided to comment assert which fail tests (only concern "localhost"). http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c834b3bd50610190444q51af279cn23a8b83834bf2c41@mail.gmail.com%3e Following tests were changed test_getByNameLjava_lang_String test_getHostName test_getCanonicalHostName
          Hide
          paulex Paulex Yang added a comment -

          Thank you all for your attention to this issue.

          Alexecy and Denis, the patch has been applied at revision 469127, please verify it is as you expected.

          Show
          paulex Paulex Yang added a comment - Thank you all for your attention to this issue. Alexecy and Denis, the patch has been applied at revision 469127, please verify it is as you expected.
          Hide
          varlax Alexey Varlamov added a comment -

          Hmm, yet not fully fixed:

          junit.framework.ComparisonFailure: expected:<127.0.0.1> but was:<localhost>
          at tests.api.java.net.InetAddressTest.test_getHostName(InetAddressTest.java:261)
          at java.lang.reflect.VMReflection.invokeMethod(Native Method)

          Show
          varlax Alexey Varlamov added a comment - Hmm, yet not fully fixed: junit.framework.ComparisonFailure: expected:<127.0.0.1> but was:<localhost> at tests.api.java.net.InetAddressTest.test_getHostName(InetAddressTest.java:261) at java.lang.reflect.VMReflection.invokeMethod(Native Method)
          Hide
          paulex Paulex Yang added a comment -

          D'oh...same environment? I mean, Harmony+IBM VME/DRLVM on Linux?

          Show
          paulex Paulex Yang added a comment - D'oh...same environment? I mean, Harmony+IBM VME/DRLVM on Linux?
          Hide
          varlax Alexey Varlamov added a comment -

          Yes, even the same machine . Both j9 and DRLVM.
          Looking at the patch, this failing assert was not changed

          Show
          varlax Alexey Varlamov added a comment - Yes, even the same machine . Both j9 and DRLVM. Looking at the patch, this failing assert was not changed
          Hide
          paulex Paulex Yang added a comment -

          ...Seems the patch commented wrong place! How about now? (revision r469894)

          Show
          paulex Paulex Yang added a comment - ...Seems the patch commented wrong place! How about now? (revision r469894)
          Hide
          varlax Alexey Varlamov added a comment -

          Better now - passed.

          Show
          varlax Alexey Varlamov added a comment - Better now - passed.
          Hide
          paulex Paulex Yang added a comment -

          Verified by Alexey.

          Show
          paulex Paulex Yang added a comment - Verified by Alexey.
          Hide
          tony.wu Tony Wu added a comment -

          I suggest to commet out the meaningless and time-consuming multi-thread lines also, not just the assertion.
          That made my alltest hang sometime.

          Show
          tony.wu Tony Wu added a comment - I suggest to commet out the meaningless and time-consuming multi-thread lines also, not just the assertion. That made my alltest hang sometime.

            People

            • Assignee:
              paulex Paulex Yang
              Reporter:
              varlax Alexey Varlamov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development