Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9290

TestXYPoint#testEqualsAndHashCode test failure

Details

    • Test
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • None
    • New

    Description

      Test assumes that if two objects are different, then the has code must be different which is a wrong assumption. 

       

      Reproduce with:

      ant test  -Dtestcase=TestXYPoint -Dtests.method=testEqualsAndHashCode -Dtests.seed=733FAE735389BD86 -Dtests.slow=true -Dtests.badapples=true -Dtests.locale=en-PW -Dtests.timezone=Africa/Gaborone -Dtests.asserts=true -Dtests.file.encoding=UTF8

       

      Error:

      5:39:56    [junit4]    > Throwable #1: java.lang.AssertionError: Values should be different. Actual: -268435620
      05:39:56    [junit4]    > 	at __randomizedtesting.SeedInfo.seed([733FAE735389BD86:F156BE502CC2B7]:0)
      05:39:56    [junit4]    > 	at org.apache.lucene.geo.TestXYPoint.testEqualsAndHashCode(TestXYPoint.java:71)
      05:39:56    [junit4]    > 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

       

      Attachments

        Activity

          People

            mdrob Mike Drob
            ivera Ignacio Vera
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: