[Django] #28234: SimpleSearchTest failures with postgresql

4 views
Skip to first unread message

Django

unread,
May 23, 2017, 8:04:21 PM5/23/17
to django-...@googlegroups.com
#28234: SimpleSearchTest failures with postgresql
-----------------------------------------+------------------------
Reporter: André Ericson | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I'm having some trouble running SimpleSearchTest on postgresql 9.6.3.
Works fine on 9.5.

{{{
# django/tests/test_postgresql.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'django_tests',
},
'other': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'django_tests_other',
}
}

SECRET_KEY = "django_tests_secret_key"

# Use a fast hasher to speed up tests.
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.MD5PasswordHasher',
]
}}}
{{{
➜ tests git:(master) ✗ python runtests.py postgres_tests --settings
tests.test_postgresql
Testing against Django installed in
'/Users/aericson/projects/django/django' with up to 4 processes
Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Creating test database for alias 'other'...
Cloning test database for alias 'other'...
Cloning test database for alias 'other'...
Cloning test database for alias 'other'...
Cloning test database for alias 'other'...
System check identified no issues (0 silenced).
.....................................................................................................................................x.........x...x.......x...............................................................................................................................FF.................................................................................
======================================================================
FAIL: test_non_exact_match (postgres_tests.test_search.SimpleSearchTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 59, in testPartExecutor
yield
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 601, in run
testMethod()
File
"/Users/aericson/projects/django/tests/postgres_tests/test_search.py",
line 92, in test_non_exact_match
self.assertSequenceEqual(searched, [self.verse2])
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 1001, in assertSequenceEqual
self.fail(msg)
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 666, in fail
raise self.failureException(msg)
AssertionError: Sequences differ: <QuerySet []> != [<Line: His head
smashed in and his heart[115 chars] -->]

Second sequence contains 1 additional elements.
First extra element 0:
<Line: His head smashed in and his heart cut out, And his liver removed
and his bowels unplugged, And his nostrils ripped and his bottom burned
off,And his -->

- <QuerySet []>
+ [<Line: His head smashed in and his heart cut out, And his liver removed
and his bowels unplugged, And his nostrils ripped and his bottom burned
off,And his -->]

======================================================================
FAIL: test_search_two_terms (postgres_tests.test_search.SimpleSearchTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 59, in testPartExecutor
yield
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 601, in run
testMethod()
File
"/Users/aericson/projects/django/tests/postgres_tests/test_search.py",
line 96, in test_search_two_terms
self.assertSequenceEqual(searched, [self.verse2])
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 1001, in assertSequenceEqual
self.fail(msg)
File
"/Users/aericson/.pyenv/versions/3.6.1/lib/python3.6/unittest/case.py",
line 666, in fail
raise self.failureException(msg)
AssertionError: Sequences differ: <QuerySet []> != [<Line: His head
smashed in and his heart[115 chars] -->]

Second sequence contains 1 additional elements.
First extra element 0:
<Line: His head smashed in and his heart cut out, And his liver removed
and his bowels unplugged, And his nostrils ripped and his bottom burned
off,And his -->

- <QuerySet []>
+ [<Line: His head smashed in and his heart cut out, And his liver removed
and his bowels unplugged, And his nostrils ripped and his bottom burned
off,And his -->]

----------------------------------------------------------------------
Ran 366 tests in 0.907s

FAILED (failures=2, expected failures=4)
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...
Destroying test database for alias 'other'...
Destroying test database for alias 'other'...
Destroying test database for alias 'other'...
Destroying test database for alias 'other'...
➜ tests git:(master) ✗
}}}

Please let me know if I can provide some more info.
I noticed Jenkins runs on 9.5, so I don't know if this problem is just for
me or everybody.

Thanks.

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

Django

unread,
May 23, 2017, 8:32:36 PM5/23/17
to django-...@googlegroups.com
#28234: SimpleSearchTest failures with postgresql
----------------------------------+--------------------------------------

Reporter: André Ericson | Owner: nobody
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:

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

* component: Uncategorized => contrib.postgres


Comment:

Tests are passing on PostgreSQL 9.6.3 for me (Ubuntu 14.04).

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

Django

unread,
May 24, 2017, 7:00:15 AM5/24/17
to django-...@googlegroups.com
#28234: SimpleSearchTest failures with postgresql
----------------------------------+--------------------------------------

Reporter: André Ericson | Owner: nobody
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Florian Apolloner):

Might be related to the current locale settings of the db?

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

Django

unread,
May 24, 2017, 3:22:23 PM5/24/17
to django-...@googlegroups.com
#28234: SimpleSearchTest failures with postgresql
----------------------------------+--------------------------------------

Reporter: André Ericson | Owner: nobody
Type: Bug | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: invalid

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

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


Comment:

It does seem to be a locale problem.

Cleaned up everything (removed /usr/local/var/postgres), installed
postgres again with {{{ export LC_ALL=en_US.UTF-8; export LANG=en_US.UTF-8
}}} and it worked.

Thanks guys.

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

Reply all
Reply to author
Forward
0 new messages