EMC smis unit tests are extremely slow

Bug #1285927 reported by John Griffith
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Xing Yang

Bug Description

Recently it was observed that the EMC unit tests were extremely slow taking on the order from 10 to 20 seconds to complete on individual tests. Tracing through the tests the culprits are the smis_common._find_storage_sync_sv_sv, smis_common._wait_for_job_complete.

We should probably have a cleaner way to do this anyway than a 10 second sleep up to 100 iterations; maybe an async handle to check or something along those lines, or even a scaling sleep factor like we've done in other places.

In terms of the unit tests, it's highly annoying that we spend as much time testing EMC as we do. We should definitely consider mocking this out, or making the sleep a variable that we can adjust somehow.

Tags: drivers emc
Revision history for this message
Jay Bryant (jsbryant) wrote :

I think I have seen cases in Nova where they mock out time.sleep to sleep in tenths of a second instead of seconds. That could help the situation.

Revision history for this message
Mike Perez (thingee) wrote :

Really if you're doing any tests that involve a sleep, one second is fine, but 10 seconds or more is a bit much.

Mike Perez (thingee)
tags: added: drivers emc
Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Xing Yang (xing-yang)
Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Xing Yang (xing-yang) wrote :

Added a fake_sleep in unit tests to return right away, so EMC SMI-S driver unit tests are not slow any more.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/77280
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=41b772fc09cd839137dabe6648b11798a43fc1e4
Submitter: Jenkins
Branch: master

commit 41b772fc09cd839137dabe6648b11798a43fc1e4
Author: Xing Yang <email address hidden>
Date: Fri Feb 28 17:07:32 2014 -0500

    Make EMC SMI-S driver unit tests faster.

    Some of EMC SMI-S driver unit tests are very slow.
    This patch uses a fake_sleep in unit tests to return right away.

    Change-Id: Ia8a429799066ccde51079be68408498805869774
    Closes-Bug: #1285927

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → 2014.1
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.