[Django] #30617: test_check_constraints sometimes fails with no such table error

9 views
Skip to first unread message

Django

unread,
Jul 6, 2019, 6:18:48 AM7/6/19
to django-...@googlegroups.com
#30617: test_check_constraints sometimes fails with no such table error
---------------------------------------------+------------------------
Reporter: kulikjak | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.11
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 |
---------------------------------------------+------------------------
Hi,

since the 1.11.22 version of Django we sometimes get an error when running
a test suite:

`test_check_constraints (backends.tests.FkConstraintsTests) ... ERROR`

I tried to find the exact problem but was unsuccessful. It doesn't happen
when just a single test is run, I wasn't able to reproduce it when
`backends` only tests were run either and even when the entire test suite
is run, it only manifests itself sometimes (and when it does, it is always
just this single test).

We never saw this in 1.11.20 or any previous version.

Here is an entire error message:
{{{
======================================================================
ERROR: test_check_constraints (backends.tests.FkConstraintsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/.../django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/.../django/db/backends/sqlite3/base.py", line 326, in execute
return Database.Cursor.execute(self, query)
sqlite3.OperationalError: no such table:
alter_alter_field_reloads_state_on_fk_target_changes_pony__old

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/.../tests/backends/tests.py", line 1026, in
test_check_constraints
connection.check_constraints()
File "/.../django/db/backends/sqlite3/base.py", line 286, in
check_constraints
column_name, referenced_column_name,
File "/.../django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/.../django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/.../django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/.../django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/.../django/db/backends/sqlite3/base.py", line 326, in execute
return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: no such table:
alter_alter_field_reloads_state_on_fk_target_changes_pony__old
}}}

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

Django

unread,
Jul 8, 2019, 1:48:43 AM7/8/19
to django-...@googlegroups.com
#30617: test_check_constraints sometimes fails with no such table error.
-----------------------------------+--------------------------------------
Reporter: Jakub Kulík | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: 1.11
Severity: Normal | Resolution: worksforme

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 felixxm):

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


Comment:

Thanks for this report, however I'm not able to reproduce this issue also
this hasn't happened on [https://djangoci.com/job/django-1.11/ DjangoCI].
Moreover we don't have any changes in the Django ORM or in this test
between versions 1.11.20 and 1.11.22.

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

Reply all
Reply to author
Forward
0 new messages