Opened 10 years ago
Closed 22 months ago
#23842 closed Bug (fixed)
Transient failure of django.contrib.gis.tests.geoapp.tests.GeoQuerySetTest.test_make_line
Reported by: | Simon Charette | Owned by: | Mariusz Felisiak |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | t.chaumeny@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Traceback (most recent call last): File "/home/jenkins/workspace/django-master/database/postgis/python/python3.2/django/test/testcases.py", line 959, in skip_wrapper return test_func(*args, **kwargs) File "/home/jenkins/workspace/django-master/database/postgis/python/python3.2/django/contrib/gis/tests/geoapp/tests.py", line 632, in test_make_line self.assertTrue(ref_line.equals_exact(City.objects.make_line(), tolerance=10e-5)) AssertionError: False is not true
Change History (13)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Couldn't reproduce locally with 80 tries... I suggest we keep this ticket open as a reference until we figure out how to deal with this.
comment:3 by , 10 years ago
I suspect an issue with ordering, but simply adding an order_by()
will not be enough. The ST_MakeLine documentation suggests to solve this by using the PostgreSQL 9+ ORDER BY support for aggregates. So the proper fix might not be trivial.
comment:4 by , 10 years ago
That might be an explanation. What about adding some message like self.assertTrue(ref_line.equals_exact(line, tolerance=10e-5), "%s != %s" % (ref_line, line))
so that we can see the actual differences ?
comment:6 by , 10 years ago
Cc: | added |
---|
comment:7 by , 7 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I haven't seen this failure recently.
comment:8 by , 7 years ago
Resolution: | worksforme |
---|---|
Status: | closed → new |
I saw this on Jenkins (a pull request to the master branch) today.
File "python3.6/tests/gis_tests/geoapp/tests.py", line 540, in test_make_line "%s != %s" % (ref_line, line) AssertionError: False is not true : SRID=4326;LINESTRING (-95.363151 29.763374, -96.80161099999999 32.782057, -97.521157 34.464642, 174.783117 -41.315268, -104.609252 38.255001, -95.23506 38.971823, -87.650175 41.850385, -123.305196 48.462611) != SRID=4326;LINESTRING (-104.609252 38.255001, -95.23506 38.971823, -87.650175 41.850385, -123.305196 48.462611, -95.363151 29.763374, -96.80161099999999 32.782057, -97.521157 34.464642, 174.783117 -41.315268)
comment:9 by , 2 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I haven't seen this failure in the last 2-3 years.
comment:10 by , 22 months ago
Resolution: | worksforme |
---|---|
Status: | closed → new |
comment:11 by , 22 months ago
It started failing again:
False is not true : SRID=4326;LINESTRING (-95.363151 29.763374, -96.80161099999999 32.782057, -97.521157 34.464642, 174.783117 -41.315268, -104.609252 38.255001, -95.23506 38.971823, -87.650175 41.850385, -123.305196 48.462611) != SRID=4326;LINESTRING (-87.650175 41.850385, -123.305196 48.462611, -95.363151 29.763374, -96.80161099999999 32.782057, -97.521157 34.464642, 174.783117 -41.315268, -104.609252 38.255001, -95.23506 38.971823)
That looks like a floating point error due to the underlying library implementation. This test used to fail more often before
tolerance
was added (see also https://github.com/django/django/commit/9f576dd54fafdd76aa250f8947cc76c7ae19216c).Can you reproduce the failure on your machine ? — I can't on mine even if I run the test a hundred time.