#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.95086ab19be942a46afe292a4c39b393%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to