[Django] #31601: Test suite fails on PostgreSQL 10.13

5 views
Skip to first unread message

Django

unread,
May 17, 2020, 5:04:44 PM5/17/20
to django-...@googlegroups.com
#31601: Test suite fails on PostgreSQL 10.13
-------------------------------------+-------------------------------------
Reporter: Hannes | Owner: Hannes Ljungberg
Ljungberg |
Type: Bug | Status: assigned
Component: | Version: 3.1
contrib.postgres |
Severity: Normal | Keywords: tests
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
A couple of full text search related to headlines tests break on
PostgresSQL 10.13. The reason appears to be that a trailing `!` is now
present in the results which breaks the equality checks. Looking at the
10.13 release notes ([https://www.postgresql.org/docs/release/10.13/])
it's probable that the patch "Fix ts_headline() to make better headline
selections when working with phrase queries" introduced this behaviour.

Output of failures:

{{{
======================================================================
FAIL [0.015s]: test_headline
(postgres_tests.test_search.SearchHeadlineTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tests/django/tests/postgres_tests/test_search.py", line 569, in
test_headline
'<b>Robin</b>. He was not at all afraid to be killed in nasty '
AssertionError: '<b>R[80 chars]brave</b>, <b>brave</b>, <b>brave</b>
<b>Sir</b> <b>Robin</b>!' != '<b>R[80 chars]brave</b>, <b>brave</b>,
<b>brave</b> <b>Sir</b> <b>Robin</b>'
- <b>Robin</b>. He was not at all afraid to be killed in nasty ways.
<b>Brave</b>, <b>brave</b>, <b>brave</b>, <b>brave</b> <b>Sir</b>
<b>Robin</b>!
?
-
+ <b>Robin</b>. He was not at all afraid to be killed in nasty ways.
<b>Brave</b>, <b>brave</b>, <b>brave</b>, <b>brave</b> <b>Sir</b>
<b>Robin</b>


======================================================================
FAIL [0.019s]: test_headline_separator_options
(postgres_tests.test_search.SearchHeadlineTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tests/django/tests/postgres_tests/test_search.py", line 621, in
test_headline_separator_options
'<span>Robin</span>. He was not at all afraid to be killed in '
AssertionError: '<spa[122 chars]span>, <span>brave</span> <span>Sir</span>
<span>Robin</span>!' != '<spa[122 chars]span>, <span>brave</span>
<span>Sir</span> <span>Robin</span>'
- <span>Robin</span>. He was not at all afraid to be killed in nasty ways.
<span>Brave</span>, <span>brave</span>, <span>brave</span>,
<span>brave</span> <span>Sir</span> <span>Robin</span>!
?
-
+ <span>Robin</span>. He was not at all afraid to be killed in nasty ways.
<span>Brave</span>, <span>brave</span>, <span>brave</span>,
<span>brave</span> <span>Sir</span> <span>Robin</span>


======================================================================
FAIL [0.016s]: test_headline_short_word_option
(postgres_tests.test_search.SearchHeadlineTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tests/django/tests/postgres_tests/test_search.py", line 650, in
test_headline_short_word_option
), True)
AssertionError: False is not True
}}}

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

Django

unread,
May 17, 2020, 5:22:27 PM5/17/20
to django-...@googlegroups.com
#31601: Test suite fails on PostgreSQL 10.13
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes

| Ljungberg
Type: Bug | Status: assigned
Component: contrib.postgres | Version: 3.1
Severity: Normal | Resolution:
Keywords: tests | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

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

Comment (by Hannes Ljungberg):

PR: https://code.djangoproject.com/ticket/31601#ticket

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

Django

unread,
May 18, 2020, 1:08:49 AM5/18/20
to django-...@googlegroups.com
#31601: Test suite fails on latest PostgreSQL versions

-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
| Ljungberg
Type: Bug | Status: assigned
Component: contrib.postgres | Version: 3.1
Severity: Normal | Resolution:
Keywords: tests | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Hannes Ljungberg:

Old description:

New description:

A couple of full text search related to headlines tests break on the
latest PostgresSQL versions (9.6.18, 10.13 11.8, 12.3). The reason appears

Output of failures:

--

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

Django

unread,
May 18, 2020, 1:19:19 AM5/18/20
to django-...@googlegroups.com
#31601: postgres_tests.test_search.SearchHeadlineTests fails on latest PostgreSQL
versions.

-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: assigned

Component: contrib.postgres | Version: 3.1
Severity: Normal | Resolution:
Keywords: tests | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted


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

Django

unread,
May 19, 2020, 2:16:31 AM5/19/20
to django-...@googlegroups.com
#31601: postgres_tests.test_search.SearchHeadlineTests fails on latest PostgreSQL
versions.
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: closed
Component: contrib.postgres | Version: 3.1
Severity: Normal | Resolution: fixed

Keywords: tests | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"952afc166c8d79013b7181e35aab638145d2adc5" 952afc1]:
{{{
#!CommitTicketReference repository=""
revision="952afc166c8d79013b7181e35aab638145d2adc5"
Fixed #31601 -- Fixed SearchHeadlineTests on PostgresSQL 9.6.18+, 10.13+,
11.8+, and 12.3+.
}}}

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

Django

unread,
May 19, 2020, 2:16:51 AM5/19/20
to django-...@googlegroups.com
#31601: postgres_tests.test_search.SearchHeadlineTests fails on latest PostgreSQL
versions.
-------------------------------------+-------------------------------------
Reporter: Hannes Ljungberg | Owner: Hannes
Type: | Ljungberg
Cleanup/optimization | Status: closed
Component: contrib.postgres | Version: 3.1
Severity: Normal | Resolution: fixed
Keywords: tests | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"7ee19a0f78835c62c89cb3f3ee89135ea17a1bf9" 7ee19a0]:
{{{
#!CommitTicketReference repository=""
revision="7ee19a0f78835c62c89cb3f3ee89135ea17a1bf9"
[3.1.x] Fixed #31601 -- Fixed SearchHeadlineTests on PostgresSQL 9.6.18+,
10.13+, 11.8+, and 12.3+.

Backport of 952afc166c8d79013b7181e35aab638145d2adc5 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages