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

CompositeStrategyTest.testOperations "[Overlaps] Should have matched" AssertionError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I hit this while doing unrelated beasting:

      -test:
          [mkdir] Created dir: /l/trunk/lucene/build/spatial/test
      [junit4:pickseed] Seed property 'tests.seed' already defined: E1320619EC8749DF
          [mkdir] Created dir: /l/trunk/lucene/build/spatial/test/temp
          [mkdir] Created dir: /l/trunk/.caches/test-stats/spatial
         [junit4] <JUnit4> says hallo! Master seed: E1320619EC8749DF
         [junit4] Executing 1 suite with 1 JVM.
         [junit4] 
         [junit4] Started J0 PID(32324@localhost).
         [junit4] Suite: org.apache.lucene.spatial.composite.CompositeStrategyTest
         [junit4] OK      0.29s | CompositeStrategyTest.testOperations {#0 seed=[E1320619EC8749DF:9319DB8F802FC2C7]}
         [junit4] OK      0.08s | CompositeStrategyTest.testOperations {#1 seed=[E1320619EC8749DF:274F6773B4ED09EB]}
         [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=CompositeStrategyTest -Dtests.method=testOperations -Dtests.seed=E1320619EC8749DF -Dtests.locale=nl_NL -Dtests.timezone=Antarctica/Casey -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
         [junit4] FAILURE 0.15s | CompositeStrategyTest.testOperations {#2 seed=[E1320619EC8749DF:A9A6F1AFE5294120]} <<<
         [junit4]    > Throwable #1: java.lang.AssertionError: [Overlaps] qIdx:1 Should have matched I#2:Circle(Pt(x=45.0,y=-8.0), d=88.4° 9827.73km) Q:Circle(Pt(x=-135.0,y=8.0), d=57.5° 6396.19km)
         [junit4]    > 	at __randomizedtesting.SeedInfo.seed([E1320619EC8749DF:A9A6F1AFE5294120]:0)
         [junit4]    > 	at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.fail(RandomSpatialOpStrategyTestCase.java:127)
         [junit4]    > 	at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperation(RandomSpatialOpStrategyTestCase.java:121)
         [junit4]    > 	at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperationRandomShapes(RandomSpatialOpStrategyTestCase.java:56)
         [junit4]    > 	at org.apache.lucene.spatial.composite.CompositeStrategyTest.testOperations(CompositeStrategyTest.java:99)
         [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
         [junit4] OK      0.04s | CompositeStrategyTest.testOperations {#3 seed=[E1320619EC8749DF:98485A4A89D71A09]}
         [junit4] OK      0.14s | CompositeStrategyTest.testOperations {#4 seed=[E1320619EC8749DF:D489DFE728DFDAB2]}
         [junit4] OK      0.06s | CompositeStrategyTest.testOperations {#5 seed=[E1320619EC8749DF:45730CB8556397B2]}
         [junit4] OK      0.04s | CompositeStrategyTest.testOperations {#6 seed=[E1320619EC8749DF:7BAD683E475387B4]}
         [junit4] OK      0.06s | CompositeStrategyTest.testOperations {#7 seed=[E1320619EC8749DF:E71EF2446447131A]}
         [junit4] OK      0.03s | CompositeStrategyTest.testOperations {#8 seed=[E1320619EC8749DF:D5B2172A138C0440]}
         [junit4] OK      0.03s | CompositeStrategyTest.testOperations {#9 seed=[E1320619EC8749DF:239419077DB3312]}
         [junit4] OK      0.03s | CompositeStrategyTest.testOperations {#10 seed=[E1320619EC8749DF:F778A9CBA56711CA]}
         [junit4] OK      0.03s | CompositeStrategyTest.testOperations {#11 seed=[E1320619EC8749DF:7CDF650E21FAB003]}
         [junit4] OK      0.02s | CompositeStrategyTest.testOperations {#12 seed=[E1320619EC8749DF:1BECF0B7C48772F2]}
         [junit4] OK      0.04s | CompositeStrategyTest.testOperations {#13 seed=[E1320619EC8749DF:74A7D7A85812F382]}
         [junit4] OK      0.02s | CompositeStrategyTest.testOperations {#14 seed=[E1320619EC8749DF:2939D8308A63B5DB]}
         [junit4] OK      0.04s | CompositeStrategyTest.testOperations {#15 seed=[E1320619EC8749DF:4A8B353498E120EA]}
         [junit4] OK      0.02s | CompositeStrategyTest.testOperations {#16 seed=[E1320619EC8749DF:CC7092FD53E94B83]}
         [junit4] OK      0.03s | CompositeStrategyTest.testOperations {#17 seed=[E1320619EC8749DF:783F40E69FDC39F1]}
         [junit4] OK      0.04s | CompositeStrategyTest.testOperations {#18 seed=[E1320619EC8749DF:674B3FE8E349D6F3]}
         [junit4] OK      0.12s | CompositeStrategyTest.testOperations {#19 seed=[E1320619EC8749DF:6DDB4C0449A1905E]}
         [junit4]   2> NOTE: test params are: codec=Asserting(Lucene53), sim=DefaultSimilarity, locale=nl_NL, timezone=Antarctica/Casey
         [junit4]   2> NOTE: Linux 3.13.0-46-generic amd64/Oracle Corporation 1.8.0_40 (64-bit)/cpus=8,threads=1,free=374435352,total=495976448
         [junit4]   2> NOTE: All tests run in this JVM: [CompositeStrategyTest]
         [junit4] Completed [1/1] in 1.47s, 20 tests, 1 failure <<< FAILURES!
         [junit4] 
         [junit4] 
         [junit4] Tests with failures:
         [junit4]   - org.apache.lucene.spatial.composite.CompositeStrategyTest.testOperations {#2 seed=[E1320619EC8749DF:A9A6F1AFE5294120]}
         [junit4] 
         [junit4] 
         [junit4] JVM J0:     0.38 ..     2.29 =     1.91s
         [junit4] Execution time total: 2.29 sec.
         [junit4] Tests summary: 1 suite, 20 tests, 1 failure
      

        Issue Links

          Activity

          Hide
          dsmiley David Smiley added a comment -

          Fixed by LUCENE-6810 (upgrade to Spatial4j 0.5)

          Show
          dsmiley David Smiley added a comment - Fixed by LUCENE-6810 (upgrade to Spatial4j 0.5)
          Hide
          dsmiley David Smiley added a comment -

          This turned out to be a fixed bug in Spatial4j – https://github.com/locationtech/spatial4j/issues/104 (numerical robustness issue when computing haversine distance). A temporary workaround is to configure the SpatialContext with a different distance calculator – law of cosines or vincenty. I'll close this issue once Spatial4j is upgraded to 0.5 which should happen in a week or two.

          Show
          dsmiley David Smiley added a comment - This turned out to be a fixed bug in Spatial4j – https://github.com/locationtech/spatial4j/issues/104 (numerical robustness issue when computing haversine distance). A temporary workaround is to configure the SpatialContext with a different distance calculator – law of cosines or vincenty. I'll close this issue once Spatial4j is upgraded to 0.5 which should happen in a week or two.
          Hide
          dsmiley David Smiley added a comment -

          I had trouble reproducing with both these; something may have changed in all this time, so I beasted it and found it reproduces with this:
          ant test -Dtestcase=CompositeStrategyTest -Dtests.method=testOperations -Dtests.seed=A12C52A56650B0E5

          Show
          dsmiley David Smiley added a comment - I had trouble reproducing with both these; something may have changed in all this time, so I beasted it and found it reproduces with this: ant test -Dtestcase=CompositeStrategyTest -Dtests.method=testOperations -Dtests.seed=A12C52A56650B0E5
          Hide
          dsmiley David Smiley added a comment -

          This triggered recently and may or may not be the same problem:
          http://build-eu-00.elastic.co/job/lucene_linux_java8_64_test_only/57226/testReport/junit/org.apache.lucene.spatial.composite/CompositeStrategyTest/testOperations___1_seed__7A112ED39E509942_BC6C4FB9C63AD976__/

          Error Message
          
          [Overlaps] qIdx:16 Should have matched I#0:Circle(Pt(x=-32.0,y=58.0), d=9.0° 996.49km) Q:Circle(Pt(x=148.0,y=-58.0), d=88.1° 9794.77km)
          Stacktrace
          
          java.lang.AssertionError: [Overlaps] qIdx:16 Should have matched I#0:Circle(Pt(x=-32.0,y=58.0), d=9.0° 996.49km) Q:Circle(Pt(x=148.0,y=-58.0), d=88.1° 9794.77km)
          	at __randomizedtesting.SeedInfo.seed([7A112ED39E509942:BC6C4FB9C63AD976]:0)
          	at org.junit.Assert.fail(Assert.java:93)
          	at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.fail(RandomSpatialOpStrategyTestCase.java:127)
          	at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperation(RandomSpatialOpStrategyTestCase.java:121)
          	at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperationRandomShapes(RandomSpatialOpStrategyTestCase.java:56)
          	at org.apache.lucene.spatial.composite.CompositeStrategyTest.testOperations(CompositeStrategyTest.java:99)
          

          p.s. I'm on vacation now and will get to this eventually

          Show
          dsmiley David Smiley added a comment - This triggered recently and may or may not be the same problem: http://build-eu-00.elastic.co/job/lucene_linux_java8_64_test_only/57226/testReport/junit/org.apache.lucene.spatial.composite/CompositeStrategyTest/testOperations___1_seed__7A112ED39E509942_BC6C4FB9C63AD976__/ Error Message [Overlaps] qIdx:16 Should have matched I#0:Circle(Pt(x=-32.0,y=58.0), d=9.0° 996.49km) Q:Circle(Pt(x=148.0,y=-58.0), d=88.1° 9794.77km) Stacktrace java.lang.AssertionError: [Overlaps] qIdx:16 Should have matched I#0:Circle(Pt(x=-32.0,y=58.0), d=9.0° 996.49km) Q:Circle(Pt(x=148.0,y=-58.0), d=88.1° 9794.77km) at __randomizedtesting.SeedInfo.seed([7A112ED39E509942:BC6C4FB9C63AD976]:0) at org.junit.Assert.fail(Assert.java:93) at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.fail(RandomSpatialOpStrategyTestCase.java:127) at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperation(RandomSpatialOpStrategyTestCase.java:121) at org.apache.lucene.spatial.prefix.RandomSpatialOpStrategyTestCase.testOperationRandomShapes(RandomSpatialOpStrategyTestCase.java:56) at org.apache.lucene.spatial.composite.CompositeStrategyTest.testOperations(CompositeStrategyTest.java:99) p.s. I'm on vacation now and will get to this eventually

            People

            • Assignee:
              dsmiley David Smiley
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development