#23504 closed Bug (fixed)
Oracle GIS test failures
| Reported by: | Tim Graham | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | GIS | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
As we haven't had this build on Jenkins for a while (ever?), there are quite a few test failures that need fixing.
Change History (23)
comment:1 by , 11 years ago
comment:16 by , 11 years ago
The remaining failures are:
- Claude suggested trying a zip with a smaller area, but there are still discrepancies between what Oracle and the other DBs calculate.
======================================================================
FAIL: test06_geography_area (django.contrib.gis.tests.geogapp.tests.GeographyTest)
Testing that Area calculations work on geography columns.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/django/test/testcases.py", line 968, in skip_wrapper
return test_func(*args, **kwargs)
File "/home/tim/code/django/django/contrib/gis/tests/geogapp/tests.py", line 102, in test06_geography_area
self.assertAlmostEqual(z.area.sq_m, ref_area, tol)
AssertionError: 5439100.95415646 != 5439084.70637573 within 5 places
- Can be made to pass with the diff the follows, but may more investigation and/or just skipped on Oracle.
======================================================================
FAIL: test_unionagg (django.contrib.gis.tests.geoapp.tests.GeoQuerySetTest)
Testing the `unionagg` (aggregate union) GeoQuerySet method.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/django/test/testcases.py", line 968, in skip_wrapper
return test_func(*args, **kwargs)
File "/home/tim/code/django/django/contrib/gis/tests/geoapp/tests.py", line 751, in test_unionagg
self.assertEqual(True, union1.equals_exact(u1, tol) or union2.equals_exact(u1, tol))
AssertionError: True != False
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
index f4699ae..306664b 100644
--- a/django/contrib/gis/tests/geoapp/tests.py
+++ b/django/contrib/gis/tests/geoapp/tests.py
@@ -791,6 +791,8 @@ class GeoQuerySetTest(TestCase):
# Houston, Dallas -- Ordering may differ depending on backend or GEOS version.
union1 = fromstr('MULTIPOINT(-96.801611 32.782057,-95.363151 29.763374)')
union2 = fromstr('MULTIPOINT(-95.363151 29.763374,-96.801611 32.782057)')
+ if oracle:
+ union1 = union2 = fromstr('POINT (-97.5211570000000023 34.4646419999999978)')
qs = City.objects.filter(point__within=tx)
self.assertRaises(TypeError, qs.unionagg, 'name')
# Using `field_name` keyword argument in one query and specifying an
- Fixed in #23537.
======================================================================
FAIL: test_add_gis_field (django.contrib.gis.tests.gis_migrations.test_operations.OperationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tim/code/django/django/contrib/gis/tests/gis_migrations/test_operations.py", line 73, in test_add_gis_field
2
AssertionError: 0 != 2
Version 0, edited 11 years ago by (next)
comment:17 by , 11 years ago
For 1., I think we will not avoid using a specific value for Oracle.
For 2., unless we understand what's happening, it should be marked as an expectedFailure on Oracle. Some Oracle lover will hopefully chime in and fix it.
comment:22 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Oracle GIS tests are passing and have been added to Jenkins.
Note:
See TracTickets
for help on using tickets.
Below are the failures from 89559bcfb096ccc625e0e9ab41e2136fcb32a514 (right before e9103402c0fa873aea58a6a11dba510cd308cb84#diff-54b46d05e1da568b3cc987c423e00c50L253 which broke a bunch more with errors like:
====================================================================== ERROR [0.001s]: test02_select_related (django.contrib.gis.tests.relatedapp.tests.RelatedGeoModelTest) Testing `select_related` on geographic models (see #7126). ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/contrib/gis/tests/relatedapp/tests.py", line 40, in test02_select_related self.assertEqual(Point(lon, lat), c.location.point) File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/fields/related.py", line 565, in __get__ rel_obj = qs.get() File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/query.py", line 363, in get num = len(clone) File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/query.py", line 143, in __len__ self._fetch_all() File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/query.py", line 977, in _fetch_all self._result_cache = list(self.iterator()) File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/query.py", line 287, in iterator for row in compiler.results_iter(): File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/sql/compiler.py", line 764, in results_iter row = self.apply_converters(row, converters) File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/db/models/sql/compiler.py", line 711, in apply_converters value = converter(value, self.connection) File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/contrib/gis/db/models/fields.py", line 202, in from_db_value value = Geometry(value) File "/home/jenkins/workspace/django-oracle/database/oragis11/python/python2.7/django/contrib/gis/geos/geometry.py", line 89, in __init__ raise TypeError('Improper geometry input type: %s' % str(type(geo_input))) TypeError: Improper geometry input type: <type 'cx_Oracle.LOB'>I guess it's because this logic was lost https://github.com/django/django/commit/e9103402c0fa873aea58a6a11dba510cd308cb84#diff-54b46d05e1da568b3cc987c423e00c50L253 on GIS fields.
====================================================================== ERROR: test13c_count (django.contrib.gis.tests.relatedapp.tests.RelatedGeoModelTest) Testing `Count` aggregate with `.values()`. See #15305. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/relatedapp/tests.py", line 255, in test13c_count self.assertEqual(1, len(qs)) File "/home/tim/code/django/django/db/models/query.py", line 143, in __len__ self._fetch_all() File "/home/tim/code/django/django/db/models/query.py", line 977, in _fetch_all self._result_cache = list(self.iterator()) File "/home/tim/code/django/django/db/models/query.py", line 1091, in iterator for row in self.query.get_compiler(self.db).results_iter(): File "/home/tim/code/django/django/db/models/sql/compiler.py", line 700, in results_iter for rows in self.execute_sql(MULTI): File "/home/tim/code/django/django/db/models/sql/compiler.py", line 786, in execute_sql cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/utils.py", line 95, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/oracle/base.py", line 895, in execute return self.cursor.execute(query, self._param_generator(params)) DatabaseError: ORA-22901: cannot compare VARRAY or LOB attributes of an object type ====================================================================== ERROR: test_time_field (django.contrib.gis.tests.inspectapp.tests.OGRInspectTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/inspectapp/tests.py", line 83, in test_time_field ogr_db = get_ogr_db_string() File "/home/tim/code/django/django/contrib/gis/tests/inspectapp/tests.py", line 142, in get_ogr_db_string drv_name, db_str, param_sep = drivers.get(db['ENGINE']) TypeError: 'NoneType' object is not iterable ====================================================================== ERROR: test_textfield (django.contrib.gis.tests.layermap.tests.LayerMapTest) Tests that String content fits also in a TextField ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/layermap/tests.py", line 297, in test_textfield self.assertEqual(City.objects.all().order_by('name_txt')[0].name_txt, "Houston") File "/home/tim/code/django/django/db/models/query.py", line 198, in __getitem__ return list(qs)[0] File "/home/tim/code/django/django/db/models/query.py", line 162, in __iter__ self._fetch_all() File "/home/tim/code/django/django/db/models/query.py", line 977, in _fetch_all self._result_cache = list(self.iterator()) File "/home/tim/code/django/django/db/models/query.py", line 287, in iterator for row in compiler.results_iter(): File "/home/tim/code/django/django/db/models/sql/compiler.py", line 700, in results_iter for rows in self.execute_sql(MULTI): File "/home/tim/code/django/django/db/models/sql/compiler.py", line 786, in execute_sql cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/utils.py", line 95, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/oracle/base.py", line 895, in execute return self.cursor.execute(query, self._param_generator(params)) DatabaseError: ORA-00932: inconsistent datatypes: expected - got NCLOB ====================================================================== ERROR: test_raw_sql_query (django.contrib.gis.tests.geoapp.tests.GeoModelTest) Testing raw SQL query. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/geoapp/tests.py", line 199, in test_raw_sql_query self.assertEqual(len(cities1), len(list(cities2))) File "/home/tim/code/django/django/db/models/query.py", line 1565, in __iter__ query = iter(self.query) File "/home/tim/code/django/django/db/models/sql/query.py", line 76, in __iter__ self._execute_query() File "/home/tim/code/django/django/db/models/sql/query.py", line 94, in _execute_query self.cursor.execute(self.sql, self.params) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/utils.py", line 95, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/oracle/base.py", line 895, in execute return self.cursor.execute(query, self._param_generator(params)) DatabaseError: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_ASTEXT' ====================================================================== ERROR: test_defer_or_only_with_annotate (django.contrib.gis.tests.geoapp.test_regress.GeoRegressionTests) Regression for #16409. Make sure defer() and only() work with annotate() ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/geoapp/test_regress.py", line 70, in test_defer_or_only_with_annotate self.assertIsInstance(list(City.objects.annotate(Count('point')).defer('name')), list) File "/home/tim/code/django/django/db/models/query.py", line 162, in __iter__ self._fetch_all() File "/home/tim/code/django/django/db/models/query.py", line 977, in _fetch_all self._result_cache = list(self.iterator()) File "/home/tim/code/django/django/db/models/query.py", line 287, in iterator for row in compiler.results_iter(): File "/home/tim/code/django/django/db/models/sql/compiler.py", line 700, in results_iter for rows in self.execute_sql(MULTI): File "/home/tim/code/django/django/db/models/sql/compiler.py", line 786, in execute_sql cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/utils.py", line 95, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/oracle/base.py", line 895, in execute return self.cursor.execute(query, self._param_generator(params)) DatabaseError: ORA-22901: cannot compare VARRAY or LOB attributes of an object type ====================================================================== ERROR: test_remove_gis_field (django.contrib.gis.tests.gis_migrations.test_operations.OperationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/gis_migrations/test_operations.py", line 81, in test_remove_gis_field project_state = self.set_up_test_model() File "/home/tim/code/django/django/contrib/gis/tests/gis_migrations/test_operations.py", line 51, in set_up_test_model return self.apply_operations('gis', ProjectState(), operations) File "/home/tim/code/django/django/contrib/gis/tests/gis_migrations/test_operations.py", line 40, in apply_operations return migration.apply(project_state, editor) File "/home/tim/code/django/django/db/migrations/migration.py", line 107, in apply operation.database_forwards(self.app_label, schema_editor, project_state, new_state) File "/home/tim/code/django/django/db/migrations/operations/models.py", line 36, in database_forwards schema_editor.create_model(model) File "/home/tim/code/django/django/db/backends/schema.py", line 270, in create_model self.execute(sql, params) File "/home/tim/code/django/django/db/backends/schema.py", line 98, in execute cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/utils.py", line 95, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/home/tim/code/django/django/db/backends/utils.py", line 63, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/oracle/base.py", line 895, in execute return self.cursor.execute(query, self._param_generator(params)) DatabaseError: ORA-00955: name is already used by an existing object ====================================================================== ERROR: test_add_entry (django.contrib.gis.tests.test_spatialrefsys.SpatialRefSysTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/test_spatialrefsys.py", line 110, in test_add_entry add_srs_entry(3857) File "/home/tim/code/django/django/contrib/gis/utils/srs.py", line 43, in add_srs_entry raise Exception('This utility does not support the ' Exception: This utility does not support the Oracle or MySQL spatial backends. ====================================================================== FAIL: test10_combine (django.contrib.gis.tests.relatedapp.tests.RelatedGeoModelTest) Testing the combination of two GeoQuerySets. See #10807. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/relatedapp/tests.py", line 214, in test10_combine self.assertEqual(2, len(names)) AssertionError: 2 != 1 ====================================================================== FAIL: test_geom_columns (django.contrib.gis.tests.inspectapp.tests.InspectDbTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/inspectapp/tests.py", line 33, in test_geom_columns self.assertIn('geom = models.PolygonField()', output) AssertionError: u'geom = models.PolygonField()' not found in "# This is an auto-generated Django model module.\n# You'll have to do the following manually to clean this up:\n# * Rearrange models' order\n# * Make sure each model has one field with primary_key=True\n# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table\n# Feel free to rename the models, but don't rename db_table values or field names.\n#\n# Also note: You'll have to insert the output of 'django-admin sqlcustom [app_label]'\n# into your database.\nfrom __future__ import unicode_literals\n\nfrom django.contrib.gis.db import models\n\n\nclass InspectappAllogrfields(models.Model):\n id = models.IntegerField(primary_key=True) # AutoField?\n f_decimal = models.FloatField()\n f_float = models.FloatField()\n f_int = models.IntegerField()\n f_char = models.CharField(max_length=20, blank=True)\n f_date = models.DateField()\n f_datetime = models.DateTimeField()\n f_time = models.DateTimeField()\n geom = models.GeometryField(blank=True, null=True)\n point = models.GeometryField(blank=True, null=True)\n objects = models.GeoManager()\n\n class Meta:\n managed = False\n db_table = 'inspectapp_allogrfields'\n" ====================================================================== FAIL: test06_geography_area (django.contrib.gis.tests.geogapp.tests.GeographyTest) Testing that Area calculations work on geography columns. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/test/testcases.py", line 968, in skip_wrapper return test_func(*args, **kwargs) File "/home/tim/code/django/django/contrib/gis/tests/geogapp/tests.py", line 102, in test06_geography_area self.assertAlmostEqual(z.area.sq_m, ref_area, tol) AssertionError: 5439100.95415646 != 5439084.70637573 within 5 places ====================================================================== FAIL: test_unionagg (django.contrib.gis.tests.geoapp.tests.GeoQuerySetTest) Testing the `unionagg` (aggregate union) GeoQuerySet method. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/test/testcases.py", line 968, in skip_wrapper return test_func(*args, **kwargs) File "/home/tim/code/django/django/contrib/gis/tests/geoapp/tests.py", line 751, in test_unionagg self.assertEqual(True, union1.equals_exact(u1, tol) or union2.equals_exact(u1, tol)) AssertionError: True != False ====================================================================== FAIL: test_add_gis_field (django.contrib.gis.tests.gis_migrations.test_operations.OperationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/contrib/gis/tests/gis_migrations/test_operations.py", line 73, in test_add_gis_field 2 AssertionError: 0 != 2