﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28234	SimpleSearchTest failures with postgresql	André Ericson	nobody	"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.



"	Bug	closed	contrib.postgres	dev	Normal	invalid			Unreviewed	0	0	0	0	0	0
