yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #29227
[Bug 1430665] Re: unit test failed:django.db.utils.DatabaseError: DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 140348464949056 and this is thread id 38484560.
I'm afraid, this is not a bug:
- Horizon doesn't use a database via Django
- we do not support Icehouse any more.
If it's reproducible in a clean checkout from master branch, we will
look at it.
** Changed in: horizon
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1430665
Title:
unit test failed:django.db.utils.DatabaseError: DatabaseWrapper
objects created in a thread can only be used in that same thread. The
object with alias 'default' was created in thread id 140348464949056
and this is thread id 38484560.
Status in OpenStack Dashboard (Horizon):
Invalid
Bug description:
Checking environment.
Environment is up to date.
Running Horizon application tests
nosetests horizon --nocapture --nologcapture --exclude-dir=horizon/conf/ --exclude-dir=horizon/test/customization --cover-package=horizon --cover-inclusive --all-modules --exclude-dir=openstack_dashboard/test/integration_tests --verbosity=1
Creating test database for alias 'default'...
...............................................................................................................SSS
----------------------------------------------------------------------
Ran 114 tests in 20.880s
OK (SKIP=3)
Destroying test database for alias 'default'...
Running openstack_dashboard tests
Traceback (most recent call last):
File "/home/openstack/tecs/openstack/horizon/manage.py", line 23, in <module>
execute_from_command_line(sys.argv)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 50, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 71, in execute
super(Command, self).execute(*args, **options)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 88, in handle
failures = test_runner.run_tests(test_labels)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django_nose/runner.py", line 200, in run_tests
result = self.run_suite(nose_argv)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django_nose/runner.py", line 147, in run_suite
addplugins=plugins_to_add)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/usr/lib64/python2.7/unittest/main.py", line 95, in __init__
self.runTests()
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/nose/core.py", line 207, in runTests
result = self.testRunner.run(self.test)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/nose/core.py", line 50, in run
wrapper = self.config.plugins.prepareTest(test)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
return self.call(*arg, **kw)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
result = meth(*arg, **kw)
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django_nose/plugin.py", line 75, in prepareTest
self.old_names = self.runner.setup_databases()
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django_nose/runner.py", line 351, in setup_databases
connection.close()
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 363, in close
self.validate_thread_sharing()
File "/home/openstack/tecs/openstack/horizon/.venv/lib/python2.7/site-packages/django/db/backends/__init__.py", line 499, in validate_thread_sharing
% (self.alias, self._thread_ident, thread.get_ident()))
django.db.utils.DatabaseError: DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 140348464949056 and this is thread id 38484560.
Tests failed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1430665/+subscriptions
References