#22483 closed Bug (fixed)
Oracle test failures due to InterfaceError
Reported by: | Tim Graham | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7-beta-1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Bisected to 2e42c859da42a871244aca36162a0aad2b63c02b (#21239)
Example:
$ ./runtests.py --settings=test_oracle migrations ====================================================================== ERROR: test_migrate (migrations.test_commands.MigrateTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/test/utils.py", line 316, in inner return test_func(*args, **kwargs) File "/home/tim/code/django/django/test/utils.py", line 216, in inner return test_func(*args, **kwargs) File "/home/tim/code/django/tests/migrations/test_commands.py", line 44, in test_migrate call_command("migrate", verbosity=0) File "/home/tim/code/django/django/core/management/__init__.py", line 167, in call_command return klass.execute(*args, **defaults) File "/home/tim/code/django/django/core/management/base.py", line 337, in execute output = self.handle(*args, **options) File "/home/tim/code/django/django/core/management/commands/migrate.py", line 145, in handle executor.migrate(targets, plan, fake=options.get("fake", False)) File "/home/tim/code/django/django/db/migrations/executor.py", line 60, in migrate self.apply_migration(migration, fake=fake) File "/home/tim/code/django/django/db/migrations/executor.py", line 94, in apply_migration migration.apply(project_state, schema_editor) File "/home/tim/code/django/django/db/migrations/migration.py", line 97, in apply operation.database_forwards(self.app_label, schema_editor, project_state, new_state) File "/home/tim/code/django/django/db/migrations/operations/fields.py", line 36, in database_forwards field, File "/home/tim/code/django/django/db/backends/schema.py", line 392, in add_field self.execute(sql, params) File "/home/tim/code/django/django/db/backends/schema.py", line 95, in execute cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/utils.py", line 40, in __exit__ self.close() InterfaceError: not connected
Change History (9)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
One failure persists:
./runtests.py --settings=test_oracle transactions --failfast Testing against Django installed in '/home/tim/code/django/django' Creating test database for alias 'default'... Creating test user... Creating test database for alias 'other'... Creating test user... ....E ====================================================================== ERROR: test_atomic_prevents_queries_in_broken_transaction_after_client_close (transactions.tests.AtomicErrorsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/django/test/testcases.py", line 925, in skip_wrapper return test_func(*args, **kwargs) File "/home/tim/code/django/tests/transactions/tests.py", line 373, in test_atomic_prevents_queries_in_broken_transaction_after_client_close Reporter.objects.create(first_name="Cuthbert", last_name="Calculus") File "/home/tim/code/django/django/db/models/manager.py", line 92, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/tim/code/django/django/db/models/query.py", line 367, in create obj.save(force_insert=True, using=self.db) File "/home/tim/code/django/django/db/models/base.py", line 603, in save force_update=force_update, update_fields=update_fields) File "/home/tim/code/django/django/db/models/base.py", line 631, in save_base updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/home/tim/code/django/django/db/models/base.py", line 712, in _save_table result = self._do_insert(cls._base_manager, using, fields, update_pk, raw) File "/home/tim/code/django/django/db/models/base.py", line 745, in _do_insert using=using, raw=raw) File "/home/tim/code/django/django/db/models/manager.py", line 92, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/tim/code/django/django/db/models/query.py", line 916, in _insert return query.get_compiler(using=using).execute_sql(return_id) File "/home/tim/code/django/django/db/models/sql/compiler.py", line 924, in execute_sql self.query.get_meta().db_table, self.query.get_meta().pk.column) File "/home/tim/code/django/django/db/backends/utils.py", line 40, in __exit__ self.close() InterfaceError: not connected
comment:3 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 by , 11 years ago
I feel a little uneasy about 25209715d44562dcbf26f04ed9e0d19ee3c2aa84. I think ignoring all backend errors in close()
, on all backends, may hide real problems. For the purpose of this ticket, 53d97e4fe300f2775b5bb1b8010ec415994fa105 serves the same purpose with much narrower focus; more generally, I think we should only catch connection.features.closed_cursor_error_class
-- I don't think we can reasonably say that any other error should be silenced.
comment:8 by , 11 years ago
If you can confirm that the test suite still passes on Oracle, yes, please revert my commit.b
Hopefully fixed by e74d2183c28467aefc0b87e3fa6d405dbfdea82c (master) and 9bf890f6f9d137d5b86fd9a6a38fb11c5d21b1af (1.7.x).