EMC smis unit tests are extremely slow

Bug #1285927 reported by John Griffith on 2014-02-28
This bug affects 2 people
Affects Status Importance Assigned to Milestone
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.

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.

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) on 2014-02-28
tags: added: drivers emc
Xing Yang (xing-yang) on 2014-02-28
Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)

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

Changed in cinder:
status: New → In Progress
Xing Yang (xing-yang) on 2014-03-01
Changed in cinder:
status: In Progress → Fix Committed
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.

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) on 2014-03-05
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers