SchedulerStatsAdminTest can fail on stats timestamp. Should only compare keys.

Bug #1470928 reported by Mark Sturdevant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Mark Sturdevant

Bug Description

The SchedulerStatsAdminTest has a couple of tests that use assertDictEqual to make sure the correct pool is fetched, but comparison fails when the capabilities timestamps change. The test really only needs to validate the key values.

The truncated diff here is confusing, but I believe the problem is with the capabilities['timestamp'].

tempest.api.share.admin.test_scheduler_stats.SchedulerStatsAdminTest.test_pool_list_detail_with_filters[gate,smoke]
2015-07-01 15:18:40.987 | 2015-07-01 15:18:40.990 | -------------------------------------------------------------------------------------------------------------------
2015-07-01 15:18:40.988 | 2015-07-01 15:18:40.992 |
2015-07-01 15:18:40.990 | 2015-07-01 15:18:40.993 | Captured traceback:
2015-07-01 15:18:40.991 | 2015-07-01 15:18:40.995 | ~~~~~~~~~~~~~~~~~~~
2015-07-01 15:18:40.993 | 2015-07-01 15:18:40.997 | Traceback (most recent call last):
2015-07-01 15:18:40.995 | 2015-07-01 15:18:40.999 | File "tempest/api/share/admin/test_scheduler_stats.py", line 118, in test_pool_list_detail_with_filters
2015-07-01 15:18:40.997 | 2015-07-01 15:18:41.000 | self.assertDictEqual(pool, filtered_pool_list[0])
2015-07-01 15:18:40.998 | 2015-07-01 15:18:41.002 | File "/opt/stack/new/tempest/.tox/all/local/lib/python2.7/site-packages/unittest2/case.py", line 1128, in assertDictEqual
2015-07-01 15:18:41.000 | 2015-07-01 15:18:41.004 | self.fail(self._formatMessage(msg, standardMsg))
2015-07-01 15:18:41.002 | 2015-07-01 15:18:41.006 | File "/opt/stack/new/tempest/.tox/all/local/lib/python2.7/site-packages/unittest2/case.py", line 690, in fail
2015-07-01 15:18:41.003 | 2015-07-01 15:18:41.007 | raise self.failureException(msg)
2015-07-01 15:18:41.005 | 2015-07-01 15:18:41.009 | AssertionError: {u'ho[128 chars]T15:00:47.380263', u'QoS_support': False, u'dr[397 chars]DON'} != {u'ho[128 chars]T15:01:47.379238', u'QoS_support': False, u'dr[397 chars]DON'}
2015-07-01 15:18:41.007 | 2015-07-01 15:18:41.011 | Diff is 1022 characters long. Set self.maxDiff to None to see it.

Changed in manila:
assignee: nobody → Mark Sturdevant (mark-sturdevant)
Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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

commit d19b800d422b3a3f24958b8c257586a738ab06e0
Author: Mark Sturdevant <email address hidden>
Date: Thu Jul 2 09:28:51 2015 -0700

    Fix for SchedulerStatsAdminTest fails on timestamp

    Two tests in SchedulerStatsAdminTest can fail when
    a pool capabilities timestamp changes. The tests
    really only need to test the key values to be
    more reliable.

    The 2 tests are:
     * test_pool_list_with_filters and
     * test_pool_list_detail_with_filters

    Change-Id: I1bd8307da6c98764b12a948eed20a9f522173144
    Closes-Bug: #1470928

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in manila:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-2 → 1.0.0
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.