[Django] #34381: Postgres tests fail on Windows

5 views
Skip to first unread message

Django

unread,
Mar 3, 2023, 3:26:00 AM3/3/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
-------------------------------------+-------------------------------------
Reporter: David | Owner: nobody
Smith |
Type: | Status: new
Uncategorized |
Component: Database | Version: 4.1
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Running the test suite using the postgres backend on Windows currently
results in the following test failures. I'll attach the full log as well.

These look like isolation issues as running
`migrations.test_commands.MigrateTests.test_migrate_initial_false` on it's
own for example passes.

{{{

ERROR: test_empty_result_set
(postgres_tests.test_aggregates.TestGeneralAggregate.test_empty_result_set)
[<object object at 0x00000217E2F6AD60>]
(aggregation=(BitXor(F(integer_field)), None))

ERROR: test_migrate_other_database
(auth_tests.test_migrations.MultiDBProxyModelAppLabelTests.test_migrate_other_database)

ERROR: test_ops_class
(indexes.tests.SchemaIndexesPostgreSQLTests.test_ops_class)

ERROR: test_migrate_fake_split_initial
(migrations.test_commands.MigrateTests.test_migrate_fake_split_initial)

ERROR: test_migrate_partially_applied_squashed_migration
(migrations.test_commands.MigrateTests.test_migrate_partially_applied_squashed_migration)
Migrating to a squashed migration specified by name should succeed

FAIL: test_add_legacy_name_other_database

FAIL: test_foreign_data_wrapper
(inspectdb.tests.InspectDBTransactionalTests.test_foreign_data_wrapper)

FAIL: test_migrate_fake_initial
(migrations.test_commands.MigrateTests.test_migrate_fake_initial)

FAIL: test_migrate_initial_false
(migrations.test_commands.MigrateTests.test_migrate_initial_false)
}}}

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

Django

unread,
Mar 3, 2023, 3:26:39 AM3/3/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
-------------------------------------+-------------------------------------
Reporter: David Smith | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 4.1
(models, ORM) |
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 David Smith):

* Attachment "postgres log.txt" added.

Test log using postgresql backend on Windows.

Django

unread,
Mar 3, 2023, 3:54:39 AM3/3/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------

Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Uncategorized => Bug
* component: Database layer (models, ORM) => Core (Other)
* stage: Unreviewed => Accepted


Comment:

Thanks for the report. I fixed isolation of
`MigrateTests.test_migrate_fake_initial()` in
[https://github.com/django/django/pull/16617 PR]. Can you check how many
failures are left?

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

Django

unread,
Mar 4, 2023, 7:09:51 AM3/4/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"61f599aeb991095baa510225a4adeee91d0d43cc" 61f599ae]:
{{{
#!CommitTicketReference repository=""
revision="61f599aeb991095baa510225a4adeee91d0d43cc"
Refs #34381 -- Fixed isolation of
MigrateTests.test_migrate_fake_initial().
}}}

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

Django

unread,
Mar 4, 2023, 7:46:11 AM3/4/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by David Smith):

* Attachment "postgres log2.txt" added.

Django

unread,
Mar 4, 2023, 8:14:30 AM3/4/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

`InspectDBTransactionalTests.test_foreign_data_wrapper` crash on Windows
was fixed in 798835112d81b852efaae0e067af389c733cd1b3, maybe it's a test
regression in db7bb3b64e469fbb5c79e7b5b2fcb890434aa60f 🤔 It's definitely
related with `os.devnull`.

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

Django

unread,
Mar 4, 2023, 8:18:40 AM3/4/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by David Smith):

Following 61f599ae I've uploaded a new log showing the three remaining
test failures.

`indexes.tests.SchemaIndexesPostgreSQLTests.test_ops_class` appears to be
an isolation issue. The other two fail running those single tests.

I'll try and investigate further.

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

Django

unread,
Mar 5, 2023, 1:07:13 PM3/5/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"b05dfc289429dc4de990617da543af681d6638c7" b05dfc28]:
{{{
#!CommitTicketReference repository=""
revision="b05dfc289429dc4de990617da543af681d6638c7"
Refs #34381, Refs #10929 -- Fixed
postgres_tests.test_aggregates.TestGeneralAggretate.test_empty_result_set()
on PostgreSQL 14+.

Follow up to 0be8095b254fad65b2480d677ebe6098c41bbad6.
}}}

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

Django

unread,
Mar 6, 2023, 11:27:41 AM3/6/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

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

In [changeset:"507bc1364816370b1902f06e98818d518a3fe0e2" 507bc13]:
{{{
#!CommitTicketReference repository=""
revision="507bc1364816370b1902f06e98818d518a3fe0e2"
Refs #34381 -- Fixed
InspectDBTransactionalTests.test_foreign_data_wrapper() on Windows.
}}}

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

Django

unread,
Mar 6, 2023, 11:28:32 AM3/6/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: closed

Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution: fixed

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

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


Comment:

This should be already fixed.

--
Ticket URL: <https://code.djangoproject.com/ticket/34381#comment:7>

Django

unread,
Mar 6, 2023, 3:18:18 PM3/6/23
to django-...@googlegroups.com
#34381: Postgres tests fail on Windows
------------------------------+------------------------------------
Reporter: David Smith | Owner: nobody
Type: Bug | Status: closed
Component: Core (Other) | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by David Smith):

I agree all these test failures are now resolved.

--
Ticket URL: <https://code.djangoproject.com/ticket/34381#comment:8>

Reply all
Reply to author
Forward
0 new messages