Opened 9 years ago

Closed 9 years ago

#25438 closed Bug (fixed)

Oracle GIS test failures for Django 1.9

Reported by: Tim Graham Owned by: nobody
Component: GIS Version: dev
Severity: Normal Keywords: oracle 1.9
Cc: Jani Tiainen, felisiak.mariusz@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

After the patch for #24688 to add support for new-style GIS functions, some test failures remain:

gis_tests.geoapp.test_functions.GISFunctionsTests.test_difference

Traceback (most recent call last):
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/tests/gis_tests/geoapp/test_functions.py", line 180, in test_difference
    self.assertEqual(c.mpoly.difference(geom), c.diff)
AssertionError: <MultiPolygon object at 0x7f768d20f450> != <MultiPolygon object at 0x7f768d1df2b8>

gis_tests.geoapp.test_functions.GISFunctionsTests.test_intersection

Traceback (most recent call last):
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/tests/gis_tests/geoapp/test_functions.py", line 234, in test_intersection
    self.assertEqual(c.inter, expected)
AssertionError: '' != <GeometryCollection object at 0x7f768ea5a120>

gis_tests.geoapp.test_functions.GISFunctionsTests.test_difference_mixed_srid

Traceback (most recent call last):
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/tests/gis_tests/geoapp/test_functions.py", line 191, in test_difference_mixed_srid
    self.assertEqual(c.mpoly.difference(geom), c.difference)
AssertionError: <MultiPolygon object at 0x7f3422ed02e0> != <MultiPolygon object at 0x7f3422ed0130>

gis_tests.geogapp.tests.GeographyFunctionTests.test_distance_function

Traceback (most recent call last):
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/tests/gis_tests/geogapp/tests.py", line 120, in test_distance_function
    self.assertAlmostEqual(z.distance.m, ref, 2)
AssertionError: 4899.67677194225 != 4891.2 within 2 places

New since Jenkins was updated from Oracle 11 to Oracle 12.1.0.2.0:

gis_tests.geoapp.test_functions.GISFunctionsTests.test_sym_difference

Items in the first set but not the second: u'POLYGON ((-103.0024339999999938 36.5003969999999995, -103.0419239999999945 36.5004390000000001, .............

gis_tests.geogapp.tests.GeographyFunctionTests.test_geography_area
gis_tests.geogapp.tests.GeographyTest.test06_geography_area (same issue probably)

Traceback (most recent call last):
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/tests/gis_tests/geogapp/tests.py", line 131, in test_geography_area
    self.assertAlmostEqual(z.area.sq_m, ref_area, tol)
AssertionError: 5439100.13586914 != 5439100.95415646 within 5 places

Change History (14)

comment:1 by Claude Paroz, 9 years ago

Having error tracebacks would be nice, too.

comment:2 by Mariusz Felisiak, 9 years ago

Cc: felisiak.mariusz@… added

comment:3 by Tim Graham, 9 years ago

Description: modified (diff)

in reply to:  description comment:4 by Mariusz Felisiak, 9 years ago

Replying to timgraham:

After the patch for #24688 to add support for new-style GIS functions, some test failures remain:

gis_tests.geoapp.test_functions.GISFunctionsTests.test_difference_mixed_srid

Traceback (most recent call last):
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/django/db/utils.py", line 102, in inner
    return func(*args, **kwargs)
  File "/mnt/jenkinsdata/workspace/pull-requests-oracle/database/oragis11/python/python3.5/django/db/backends/oracle/base.py", line 516, in fetchmany
    return tuple(_rowfactory(r, self.cursor) for r in self.cursor.fetchmany(size))
cx_Oracle.DatabaseError: ORA-13199: SRID does not exist.
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_CS", line 5264
ORA-06512: at "MDSYS.SDO_CS", line 3034

Which Oracle version has been used? In test_difference_mixed_srid test we can find crucial line :

       185: geom = Point(556597.4, 2632018.6, srid=3857)  # Spherical mercator

as we can see srid=3857 is needed, but it appeared in 11.2.0.3.

http://docs.oracle.com/cd/E24693_01/appdev.11203/e11830/sdo_newfeat.htm
(section "Support for Google Maps with Spatial Applications")

In previous versions we will need to use srid=3785 instead.

Last edited 9 years ago by Mariusz Felisiak (previous) (diff)

comment:5 by Tim Graham, 9 years ago

Jenkins uses Oracle 11.2.0.1.0.

comment:6 by Tim Graham, 9 years ago

Description: modified (diff)

Jenkins is upgraded to Oracle 12.1.0.2.0. I updated the ticket description with the test failures.

comment:7 by Tim Graham, 9 years ago

Has patch: set

comment:8 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 58379d7e:

Fixed #25438 -- Fixed assorted Oracle GIS test failures.

comment:9 by Tim Graham <timograham@…>, 9 years ago

In ad005656:

[1.9.x] Fixed #25438 -- Fixed assorted Oracle GIS test failures.

Backport of 58379d7e958fdf024f896b86f7df3415ce876200 from master

comment:10 by Tim Graham, 9 years ago

Has patch: unset
Resolution: fixed
Status: closednew

test_difference and test_difference_mixed_srid still fail on the 1.9 branch.

======================================================================
FAIL [0.102s]: test_difference (gis_tests.geoapp.test_functions.GISFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/tests/gis_tests/geoapp/test_functions.py", line 180, in test_difference
    self.assertEqual(c.mpoly.difference(geom), c.diff)
AssertionError: <MultiPolygon object at 0x7f7c332b65b0> != <MultiPolygon object at 0x7f7c332b69a0>

======================================================================
FAIL [0.120s]: test_difference_mixed_srid (gis_tests.geoapp.test_functions.GISFunctionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/django/test/testcases.py", line 1093, in skip_wrapper
    return test_func(*args, **kwargs)
  File "/home/jenkins/workspace/django-oracle-1.9/database/oragis12/label/trusty/python/python2.7/tests/gis_tests/geoapp/test_functions.py", line 191, in test_difference_mixed_srid
    self.assertEqual(c.mpoly.difference(geom), c.difference)
AssertionError: <MultiPolygon object at 0x7f7c33764130> != <MultiPolygon object at 0x7f7c337640a0>

comment:11 by Sergey Fedoseev, 9 years ago

It seems that it was fixed in master by this commit. It replaces

self.assertEqual(c.mpoly.difference(geom), c.difference)

with

self.assertTrue(c.mpoly.difference(geom).equals(c.diff))

comment:12 by Jani Tiainen, 9 years ago

That is correct fix for the issue.

comment:13 by Tim Graham <timograham@…>, 9 years ago

In 5657000b:

[1.9.x] Refs #25438 -- Fixed two geoapp test failures on Oracle.

comment:14 by Tim Graham, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top