slow unit tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Low
|
Clinton Knight |
Bug Description
As of liberty.2, the Manila unit tests are taking ~60 seconds to run on my system. A dozen or so of the tests consistently take an integral number of seconds to run (i.e. 1, 2, 3 or 4 seconds), indicating the presence of a time.sleep() call in the code that hasn't been mocked. By mocking time.sleep() in just a few files, the time needed to run the unit tests falls by a third to ~40 seconds (!). No test failures were observed after making these changes.
Before the changes:
Slowest 10 tests took 19.13 secs:
manila.
test_
manila.
test_
manila.
test_
test_
test_
test_
test_
test_
manila.
test_
test_
Ran 2930 tests in 57.610s
After the changes:
Slowest 4 tests took 1.28 secs:
manila.
test_
manila.
test_
test_
test_
Ran 2930 tests in 38.173s
description: | updated |
Changed in manila: | |
milestone: | liberty-3 → liberty-2 |
Changed in manila: | |
milestone: | liberty-2 → liberty-3 |
Changed in manila: | |
status: | Fix Committed → Fix Released |
Changed in manila: | |
milestone: | liberty-3 → 1.0.0 |
my bad for the sleep. I can fix real fast if you want.
On Mon, Jul 27, 2015 at 10:21 AM, Clinton Knight <email address hidden> wrote:
> ** Description changed: tests.share. drivers. hds.test_ sop.SopShareDri verTestCase for_job_ completion_ simple tests.share. drivers. quobyte. test_jsonrpc. QuobyteJsonRpcT estCase call_http_ exception_ retry tests.share. drivers. test_generic. GenericShareDri verTestCase volume_ attached_ retry_correct volume_ failed_ attach_ 1_ManilaExcepti on volume_ failed_ attach_ 2_Invalid for_available_ volume for_available_ volume_ invalid_ 1__Mock_ id__14008148065 4736__ 1.01 for_available_ volume_ invalid_ 2__Mock_ id__14008148066 8304__ 1.01 tests.share. drivers. test_service_ instance. ServiceInstance ManagerTestCase create_ service_ instance_ with_sg_ success_ 1_nova create_ service_ instance_ with_sg_ success_ 2_neutron tests.api. contrib. test_admin_ actions. AdminActionsTes t force_delete_ share tests.share. test_manager. ShareManagerTes tCase share_from_ snapshot_ with_server share_with_ share_network_ server_ exists share_last_ on_server_ with_sec_ services_ 2_False /bugs.launchpad .net/bugs/ 1478644 tests.share. drivers. hds.test_ sop.SopShareDri verTestCase for_job_ completion_ simple tests.share. drivers. quobyte. test_jsonrpc. QuobyteJsonRpcT estCase
>
> As of liberty.2, the Manila unit tests are taking ~60 seconds to run on
> my system. A dozen or so of the tests consistently take an integral
> number of seconds to run (i.e. 1, 2, 3 or 4 seconds), indicating the
> presence of a time.sleep() call in the code that hasn't been mocked. By
> mocking time.sleep() in just a few files, the time needed to run the
> unit tests falls by a third to ~40 seconds (!). No test failures were
> observed after making these changes.
> +
> +
> + Before the changes:
> +
> + Slowest 10 tests took 19.13 secs:
> + manila.
> + test_wait_
> 1.01
> + manila.
> + test_jsonrpc_
> 3.01
> + manila.
> + test_attach_
> 2.01
> + test_attach_
> 4.02
> + test_attach_
> 4.01
> + test_wait_
> 1.01
> +
> test_wait_
> +
> test_wait_
> +
> manila.
> + test___
> 1.01
> + test___
> 1.02
> +
> + Ran 2930 tests in 57.610s
> +
> +
> + After the changes:
> +
> + Slowest 4 tests took 1.28 secs:
> + manila.
> + test_admin_
> 0.43
> + manila.
> + test_create_
> 0.30
> + test_create_
> 0.26
> + test_delete_
> 0.31
> +
> + Ran 2930 tests in 38.173s
>
> --
> You received this bug notification because you are subscribed to Manila.
> Matching subscriptions: jason bishop
> https:/
>
> Title:
> slow unit tests
>
> Status in Manila:
> In Progress
>
> Bug description:
> As of liberty.2, the Manila unit tests are taking ~60 seconds to run
> on my system. A dozen or so of the tests consistently take an
> integral number of seconds to run (i.e. 1, 2, 3 or 4 seconds),
> indicating the presence of a time.sleep() call in the code that hasn't
> been mocked. By mocking time.sleep() in just a few files, the time
> needed to run the unit tests falls by a third to ~40 seconds (!). No
> test failures were observed after making these changes.
>
>
> Before the changes:
>
> Slowest 10 tests took 19.13 secs:
> manila.
> test_wait_
> 1.01
> manila.
> tes...