Backup unittests unstable because of unspecified options

Bug #1500199 reported by Doug Shelley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Doug Shelley

Bug Description

Some of the tests in unittests/guestagent/test_backups intermittently fail like this:

FAIL: guestagent.test_backups.GuestAgentBackupTest.test_backup_not_encrypted_redisbackup_command
tags: worker-3
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/tesora-trove/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/home/ubuntu/tesora-trove/trove/tests/unittests/guestagent/test_backups.py", line 421, in test_backup_not_encrypted_redisbackup_command
    self.assertEqual(REDISBACKUP_CMD + PIPE + ZIP, bkp.command)
  File "/home/ubuntu/tesora-trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/ubuntu/tesora-trove/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = 'sudo cat /var/lib/redis/dump.rdb | gzip'
actual = 'sudo cat /var/lib/redis/dump.rdb'

Doug Shelley (0-doug)
Changed in trove:
assignee: nobody → Doug Shelley (0-doug)
Doug Shelley (0-doug)
Changed in trove:
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/228250

Changed in trove:
status: New → 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/228250
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=0d62cac929a43266c5ba5899a3ab1cc13d71a5af
Submitter: Jenkins
Branch: master

commit 0d62cac929a43266c5ba5899a3ab1cc13d71a5af
Author: Doug Shelley <email address hidden>
Date: Sun Sep 27 13:47:19 2015 +0000

    Add unspecified options to backup unittests

    The backup runner unittests have been intermittently failing
    because some of the backup commands being returned don't include
    gzip in the pipeline.

    The problem is that the tests all use the same instance of the
    BackupRunner and the is_zipped instance variable is being
    altered by the various tests. Each test that is expecting
    compression and/or encryption needs to set these variables
    explicitly. If not, depending on the timing and ordering of
    the tests, the variables may not be set as the test expects.

    Put defaults for the variables (true) into the setup() method.
    Removed code in the tests that set is_zipped or is_encrypted
    to true and will rely on the defaults in setup() for these.

    Change-Id: I74431aefe88e1aea15ca5160a6cb597b59d19fbd
    Closes-bug: 1500199

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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