one unittest fails with test run in one thread

Bug #1358854 reported by Valeriy Ponomaryov on 2014-08-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Manila
High
Valeriy Ponomaryov

Bug Description

If run unittests with "./run_tests.sh" (1 thread by default), we get next error:

======================================================================
FAIL: manila.tests.test_test.IsolationTestCase.test_service_isolation
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: pythonlogging:'': {{{Starting manila-share node (version 2013.2)}}}

Traceback (most recent call last):
  File "/home/vponomaryov/Documents/python/projects/manila/manila/tests/test_test.py", line 34, in test_service_isolation
    self.start_service('share')
  File "/home/vponomaryov/Documents/python/projects/manila/manila/test.py", line 194, in start_service
    svc.start()
  File "/home/vponomaryov/Documents/python/projects/manila/manila/service.py", line 374, in start
    self.manager.init_host()
  File "/home/vponomaryov/Documents/python/projects/manila/manila/share/manager.py", line 84, in init_host
    share_server=share_server)
  File "/home/vponomaryov/Documents/python/projects/manila/manila/share/drivers/generic.py", line 86, in wrap
    raise exception.ManilaException(_('Share server backend '
ManilaException: Share server backend details missing.

But if run with "./run_tests.sh --concurrency 4" no error appears. Thats why bug did not appear in master via tox, tox uses bunch of threads by default.
Also, adding some new tests makes it appear.
So, we have some combination of tests with some influence, if they are in one thread.

It is caused by merge of https://github.com/stackforge/manila/commit/dd4bd5c48722f478fc62b959a2367e91002d4e0d

description: updated
description: updated
description: updated
Changed in manila:
importance: Undecided → High
summary: - unittest bug that can be cathed with run_tests.sh
+ one unittest fails with one thread test run
summary: - one unittest fails with one thread test run
+ one unittest fails with test run in one thread
description: updated
description: updated
description: updated
Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress

Reviewed: https://review.openstack.org/115354
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=ecea45689fdebf409b06311cc8e84b2e609967e1
Submitter: Jenkins
Branch: master

commit ecea45689fdebf409b06311cc8e84b2e609967e1
Author: vponomaryov <email address hidden>
Date: Tue Aug 19 20:29:59 2014 +0300

    Fix failing of unittests in one thread

    With change of default driver, that is used for unittests one additional
    method 'ensure_share' was not mocked, that caused problems running
    unittests in one thread.

    Change-Id: Iea08207bb6200c37f5608d222dccdfbdc509b234
    Closes-Bug: #1358854

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
status: Fix Committed → Fix Released
Changed in manila:
milestone: none → juno-3
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers