Opened 16 years ago
Closed 16 years ago
#12395 closed (fixed)
Full suite test failures after r11863
| Reported by: | Karen Tracey | Owned by: | nobody |
|---|---|---|---|
| Component: | Uncategorized | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
r11863 seems to have introduced something into the fixtures_regress test that makes the database unflushable on most backends, resulting in failures of subsequent tests that attempt to flush the database. Example from MySQL/InnoDB (MyISAM also fails) when attempting to run the fixtures_regress and m2m_through_regress tests:
No fixtures found.
Doctest: regressiontests.fixtures_regress.models.__test__.API_TESTS ... ok
Doctest: regressiontests.m2m_through_regress.models.__test__.API_TESTS ... Error: Database test_Playground couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
The full error: (1146, "Table 'test_Playground.fixtures_regress_circle1' doesn't exist")
FAIL
======================================================================
FAIL: Doctest: regressiontests.m2m_through_regress.models.__test__.API_TESTS
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/kmt/django/trunk/django/test/_doctest.py", line 2180, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.m2m_through_regress.models.__test__.API_TESTS
File "/home/kmt/django/trunk/tests/regressiontests/m2m_through_regress/models.py", line unknown line number, in API_TESTS
----------------------------------------------------------------------
File "/home/kmt/django/trunk/tests/regressiontests/m2m_through_regress/models.py", line ?, in regressiontests.m2m_through_regress.models.__test__.API_TESTS
Failed example:
management.call_command('flush', verbosity=0, interactive=False)
Exception raised:
Traceback (most recent call last):
File "/home/kmt/django/trunk/django/test/_doctest.py", line 1267, in __run
compileflags, 1) in test.globs
File "<doctest regressiontests.m2m_through_regress.models.__test__.API_TESTS[36]>", line 1, in <module>
management.call_command('flush', verbosity=0, interactive=False)
File "/home/kmt/django/trunk/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/home/kmt/django/trunk/django/core/management/base.py", line 234, in execute
sys.exit(1)
SystemExit: 1
----------------------------------------------------------------------
Ran 2 tests in 2.325s
FAILED (failures=1)
Destroying test database...
Another subsequent tests that fails when running the full suite is serializers_regress.
Postgres also fails with a similar message, plus another:
Doctest: regressiontests.fixtures_regress.models.__test__.API_TESTS ... ok
Doctest: regressiontests.m2m_through_regress.models.__test__.API_TESTS ... Error: Database test_postgres couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
The full error: relation "fixtures_regress_circle1_id_seq" does not exist
FAIL
======================================================================
FAIL: Doctest: regressiontests.m2m_through_regress.models.__test__.API_TESTS
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/kmt/django/trunk/django/test/_doctest.py", line 2180, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.m2m_through_regress.models.__test__.API_TESTS
File "/home/kmt/django/trunk/tests/regressiontests/m2m_through_regress/models.py", line unknown line number, in API_TESTS
----------------------------------------------------------------------
File "/home/kmt/django/trunk/tests/regressiontests/m2m_through_regress/models.py", line ?, in regressiontests.m2m_through_regress.models.__test__.API_TESTS
Failed example:
management.call_command('flush', verbosity=0, interactive=False)
Exception raised:
Traceback (most recent call last):
File "/home/kmt/django/trunk/django/test/_doctest.py", line 1267, in __run
compileflags, 1) in test.globs
File "<doctest regressiontests.m2m_through_regress.models.__test__.API_TESTS[36]>", line 1, in <module>
management.call_command('flush', verbosity=0, interactive=False)
File "/home/kmt/django/trunk/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/home/kmt/django/trunk/django/core/management/base.py", line 234, in execute
sys.exit(1)
SystemExit: 1
----------------------------------------------------------------------
File "/home/kmt/django/trunk/tests/regressiontests/m2m_through_regress/models.py", line ?, in regressiontests.m2m_through_regress.models.__test__.API_TESTS
Failed example:
management.call_command('dumpdata', 'm2m_through_regress', format='json')
Expected:
[{"pk": 1, "model": "m2m_through_regress.usermembership", "fields": {"price": 100, "group": 1, "user": 1}}, {"pk": 1, "model": "m2m_through_regress.person", "fields": {"name": "Guido"}}, {"pk": 1, "model": "m2m_through_regress.group", "fields": {"name": "Python Core Group"}}]
Got:
[{"pk": 2, "model": "m2m_through_regress.membership", "fields": {"person": 1, "price": 100, "group": 2}}, {"pk": 4, "model": "m2m_through_regress.membership", "fields": {"person": 3, "price": 100, "group": 3}}, {"pk": 5, "model": "m2m_through_regress.membership", "fields": {"person": 4, "price": 50, "group": 3}}, {"pk": 6, "model": "m2m_through_regress.membership", "fields": {"person": 3, "price": 50, "group": 4}}, {"pk": 1, "model": "m2m_through_regress.usermembership", "fields": {"price": 100, "group": 1, "user": 1}}, {"pk": 3, "model": "m2m_through_regress.person", "fields": {"name": "Bob"}}, {"pk": 4, "model": "m2m_through_regress.person", "fields": {"name": "Jim"}}, {"pk": 1, "model": "m2m_through_regress.person", "fields": {"name": "Guido"}}, {"pk": 2, "model": "m2m_through_regress.group", "fields": {"name": "Roll"}}, {"pk": 3, "model": "m2m_through_regress.group", "fields": {"name": "Rock"}}, {"pk": 4, "model": "m2m_through_regress.group", "fields": {"name": "Roll"}}, {"pk": 1, "model": "m2m_through_regress.group", "fields": {"name": "Python Core Group"}}]
----------------------------------------------------------------------
Ran 2 tests in 10.751s
FAILED (failures=1)
Destroying test database...
Oracle also fails, sqlite is blithely unperturbed by whatever is bothering the other DBs.
(In [11900]) Fixed #12395 - fixed test suite flushing problems on Postgres, MySQL.