[Django] #31752: Intermittent test failure on Windows with PostgreSQL

2 views
Skip to first unread message

Django

unread,
Jun 30, 2020, 5:46:14 AM6/30/20
to django-...@googlegroups.com
#31752: Intermittent test failure on Windows with PostgreSQL
-------------------------------------+-------------------------------------
Reporter: Carlton | Owner: nobody
Gibson |
Type: Bug | Status: new
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords: Tests, Windows
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
[https://forum.djangoproject.com/t/gsoc-2020-parallel-test-runner/2528/17
Reported by Ahmad on the forum], there's an intermittent test failure with
Windows+Postgres.

{{{
(django) PS C:\Users\carlt\src\django\tests> python .\runtests.py
--settings=test_postgres m2m_through.tests.M2mThroughTests
Testing against Django installed in 'c:\users\carlt\src\django\django'
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
.....................F...................
======================================================================
FAIL: test_order_by_relational_field_through_model
(m2m_through.tests.M2mThroughTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\carlt\src\django\tests\m2m_through\tests.py", line 247,
in test_order_by_relational_field_through_model
[self.jim, self.bob]
AssertionError: Sequences differ: <QuerySet [<Person: Person object (1)>,
<Person: Person object (2)>]> != [<Person: Person object (2)>, <Person:
Person object (1)>]

First differing element 0:
<Person: Person object (1)>
<Person: Person object (2)>

- <QuerySet [<Person: Person object (1)>, <Person: Person object (2)>]>
? ---------- ^ ^ -

+ [<Person: Person object (2)>, <Person: Person object (1)>]
? ^ ^


----------------------------------------------------------------------
Ran 41 tests in 0.264s

FAILED (failures=1)
Destroying test database for alias 'default'...
}}}

Looks like a non-deterministic ordering problem.

Reproduced at 615e32162ff646db3456b90fb4eaaecc33dd3e4e.

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

Django

unread,
Jun 30, 2020, 6:07:19 AM6/30/20
to django-...@googlegroups.com
#31752: Intermittent test failure on Windows with PostgreSQL
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:

Keywords: Tests, Windows | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* owner: nobody => Carlton Gibson
* status: new => assigned
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/13126 PR] -- see if that works...

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

Django

unread,
Jun 30, 2020, 7:08:35 AM6/30/20
to django-...@googlegroups.com
#31752: Intermittent test failure on Windows with PostgreSQL
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: Bug | Status: closed

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: Tests, Windows | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

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


Comment:

In [changeset:"b5371539a9d871758d639a85d1f2fd648c1f633d" b5371539]:
{{{
#!CommitTicketReference repository=""
revision="b5371539a9d871758d639a85d1f2fd648c1f633d"
Fixed #31752 -- Fixed intermittent
test_order_by_relational_field_through_model failure.

Set explicit datetime for M2M ordering test.

Thanks to Mariusz Felisiak for the suggestion.
}}}

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

Django

unread,
Jun 30, 2020, 7:09:40 AM6/30/20
to django-...@googlegroups.com
#31752: Intermittent test failure on Windows with PostgreSQL
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Carlton
| Gibson
Type: Bug | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: Tests, Windows | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

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

In [changeset:"84640f5ae38b65fc2832e51db37d2b8be3c509c6" 84640f5a]:
{{{
#!CommitTicketReference repository=""
revision="84640f5ae38b65fc2832e51db37d2b8be3c509c6"
[3.1.x] Fixed #31752 -- Fixed intermittent
test_order_by_relational_field_through_model failure.

Set explicit datetime for M2M ordering test.

Thanks to Mariusz Felisiak for the suggestion.

Backport of b5371539a9d871758d639a85d1f2fd648c1f633d from master
}}}

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

Reply all
Reply to author
Forward
0 new messages