#25183 closed Bug (fixed)
Non-deterministic GeoIP test: GeoIPTest.test03_country
Reported by: | Tim Graham | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Since enabling the GeoIP tests on Jenkins yesterday, this test has failed several times:
Traceback (most recent call last): File "/home/jenkins/workspace/pull-requests-trusty/database/postgres/label/trusty-pr/python/python2.7/tests/gis_tests/test_geoip.py", line 76, in test03_country self.assertEqual('US', func(query)) AssertionError: u'US' != u'TW' - US + TW Traceback (most recent call last): File "/home/jenkins/workspace/pull-requests-trusty/database/sqlite3/label/trusty-pr/python/python2.7/tests/gis_tests/test_geoip.py", line 78, in test03_country self.assertEqual('United States', func(query)) AssertionError: u'United States' != u'Taiwan' - United States + Taiwan
Change History (8)
comment:1 by , 9 years ago
comment:3 by , 9 years ago
Spotted a recent failure on Jenkins:
Traceback (most recent call last): File "/home/jenkins/workspace/pull-requests-trusty/database/mysql_gis/label/trusty-pr/python/python3.4/tests/gis_tests/test_geoip.py", line 78, in test03_country self.assertEqual('United States', func(query), 'Failed for func %s and query %s' % (func, query)) AssertionError: 'United States' != 'Vietnam' - United States + Vietnam : Failed for func <bound method GeoIP.country_name of <django.contrib.gis.geoip.base.GeoIP object at 0x7f848912cbe0>> and query www.google.com
Could it be an issue because Google has servers all over the world? (not exactly sure how GeoIP lookup works). We could try switching to something like djangoproject.com which only has servers in the US.
comment:4 by , 9 years ago
Resolution: | worksforme |
---|---|
Status: | closed → new |
Note:
See TracTickets
for help on using tickets.
In c041671: