Harmony
  1. Harmony
  2. HARMONY-1664

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial 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. luni.sh
        0.4 kB
        Alexei Fedotov
      2. HARMONY-1664-InetAddressTest.patch
        2 kB
        Denis Kishenko

        Issue Links

          Activity

          Hide
          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 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.
          Hide
          Paulex Yang added a comment -

          Verified by Alexey.

          Show
          Paulex Yang added a comment - Verified by Alexey.
          Hide
          Alexey Varlamov added a comment -

          Better now - passed.

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

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

          Show
          Paulex Yang added a comment - ...Seems the patch commented wrong place! How about now? (revision r469894)
          Hide
          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
          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 Yang added a comment -

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

          Show
          Paulex Yang added a comment - D'oh...same environment? I mean, Harmony+IBM VME/DRLVM on Linux?
          Hide
          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
          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 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 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
          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
          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
          Alexei Fedotov added a comment - See http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200602.mbox/%3C43EC2AA4.7040801@gmail.com%3E
          Hide
          Paulex Yang added a comment -

          Still reproducible.

          Show
          Paulex Yang added a comment - Still reproducible.
          Hide
          Alexei Fedotov added a comment -
          Show
          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
          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
          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
          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 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
          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 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
          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 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
          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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development