[Django] #25183: Non-deterministic GeoIP test: GeoIPTest.test03_country

10 views
Skip to first unread message

Django

unread,
Jul 28, 2015, 7:41:07 AM7/28/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
-------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+------------------------
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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25183>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 28, 2015, 7:57:33 AM7/28/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"c0416711672ab289260c4a00a0024da862140027" c041671]:
{{{
#!CommitTicketReference repository=""
revision="c0416711672ab289260c4a00a0024da862140027"
Refs #25183 -- Added debugging for non-deterministic GeoIP test.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:1>

Django

unread,
Jul 29, 2015, 11:26:33 AM7/29/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+--------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: worksforme

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => worksforme


Comment:

This hasn't reoccurred.

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:2>

Django

unread,
Jul 30, 2015, 10:18:19 AM7/30/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+--------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: worksforme

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------

Comment (by timgraham):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:3>

Django

unread,
Jul 30, 2015, 10:18:50 AM7/30/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------
Changes (by timgraham):

* status: closed => new
* resolution: worksforme =>


--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:4>

Django

unread,
Jul 30, 2015, 12:35:38 PM7/30/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/5069 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:5>

Django

unread,
Jul 30, 2015, 6:12:36 PM7/30/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed

* resolution: => fixed


Comment:

In [changeset:"5b6ca150730cddb09ff8622d49b273d57b9c6703" 5b6ca150]:
{{{
#!CommitTicketReference repository=""
revision="5b6ca150730cddb09ff8622d49b273d57b9c6703"
Fixed #25183 -- Fixed non-deterministic GeoIP test.

google.com doesn't always resolve to an IP inside the United States.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:6>

Django

unread,
Jul 30, 2015, 6:18:19 PM7/30/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"77566dcc6e489de9f711498b3d5c9018b50be176" 77566dcc]:
{{{
#!CommitTicketReference repository=""
revision="77566dcc6e489de9f711498b3d5c9018b50be176"
[1.8.x] Fixed #25183 -- Fixed non-deterministic GeoIP test.

google.com doesn't always resolve to an IP inside the United States.

Backport of 5b6ca150730cddb09ff8622d49b273d57b9c6703 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:8>

Django

unread,
Jul 30, 2015, 6:18:19 PM7/30/15
to django-...@googlegroups.com
#25183: Non-deterministic GeoIP test: GeoIPTest.test03_country
---------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"4fc5b487a8c23820240d70f334e612a7fcc33771" 4fc5b487]:
{{{
#!CommitTicketReference repository=""
revision="4fc5b487a8c23820240d70f334e612a7fcc33771"
[1.7.x] Fixed #25183 -- Fixed non-deterministic GeoIP test.

google.com doesn't always resolve to an IP inside the United States.

Backport of 5b6ca150730cddb09ff8622d49b273d57b9c6703 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25183#comment:7>

Reply all
Reply to author
Forward
0 new messages