unit-tests sometime fails for guestagent.test_dbaas.CouchDBAppTest.test_restart

Bug #1434527 reported by Sushil Kumar
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Doug Shelley

Bug Description

Unit tests fail some times for guestagent.test_dbaas.CouchDBAppTest.test_restart

======================================================================
FAIL: guestagent.test_dbaas.CouchDBAppTest.test_restart
tags: worker-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/coding/bp-cluster-code/cluster-final/trove/tests/unittests/guestagent/test_dbaas.py", line 1841, in test_restart
    self.assertTrue(self.couchdbApp.stop_db.called)
  File "/mnt/coding/bp-cluster-code/cluster-final/.tox/py27/local/lib/python2.7/site-packages/unittest2/case.py", line 678, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true
Ran 881 tests in 9.283s (+0.370s)
FAILED (id=9, failures=1 (+1), skips=1)
error: testr failed (1)
ERROR: InvocationError: '/mnt/coding/bp-cluster-code

Also found on one of gate logs

http://logs.openstack.org/82/164282/4/gate/gate-trove-python27/faf436b/console.html which ran for https://review.openstack.org/#/c/164282/

Doug Shelley (0-doug)
Changed in trove:
assignee: nobody → Doug Shelley (0-doug)
milestone: none → kilo-rc1
status: New → Confirmed
Changed in trove:
status: Confirmed → In Progress
Changed in trove:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/167368
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=087229b4fbde7002cc05606e18411b5088582377
Submitter: Jenkins
Branch: master

commit 087229b4fbde7002cc05606e18411b5088582377
Author: Doug Shelley <email address hidden>
Date: Tue Mar 24 18:49:31 2015 +0000

    Fix CouchDB unit test to properly mock restart

    In test_couchdb_manager.py, GuestAgentCouchDBManagerTest.test_restart
    isn't properly mocking CouchDBApp.restart. As coded, subsequent
    tests calling restart will not necessarily behave correctly.

    This change uses the with patch.object construct to correct this.

    Change-Id: I5fb4895eae81a7ef89bd7fadfeee7ef5595b7fc5
    Closes-Bug: 1434527

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: kilo-rc1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.