test_ratelimit_sleep_with_incr unreliable in gate

Bug #1298154 reported by Clark Boylan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Unassigned

Bug Description

test_ratelimit_sleep_with_incr has failed in the gate. See http://logs.openstack.org/09/83209/3/gate/gate-swift-python26/5109caa/console.html for log of the failure. This appears to be related to the test using eventlet.sleep() and assuming the sleeps will no go over the desired time amount. But eventlet.sleep() can sleep for longer than specified.

To correct this time.time() and possibly eventlet.sleep() may need to be mocked out to allow for a greater degree of control over the "sleep" period.

While we are at it the assert can be rewritten as 'self.assertTrue(abs(500 - (time.time() - start) * 1000) < 100)' to use the same time scale as ratelimit_sleep.

Tags: gate-failure
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/83277
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=5bb7603fce7bba58dd73cdca956e015054391380
Submitter: Jenkins
Branch: master

commit 5bb7603fce7bba58dd73cdca956e015054391380
Author: Peter Portante <email address hidden>
Date: Wed Mar 26 22:38:03 2014 -0400

    Mock out time and sleep to avoid races

    We mock out time.time(), time.sleep() and eventlet.sleep() so that we
    avoid test problems caused by exceedingly long delays during the
    execution of the test.

    We also make sure to convert the units used in the tests to
    milliseconds for a bit more clarity.

    Closes bug: 1298154

    Change-Id: I803d06cbf205a02a4f7bb1e0c467d276632cd6a3

Changed in swift:
status: New → Fix Committed
Changed in swift:
milestone: none → 1.13.1-rc1
Thierry Carrez (ttx)
Changed in swift:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/ec)

Fix proposed to branch: feature/ec
Review: https://review.openstack.org/85919

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/ec)
Download full text (13.1 KiB)

Reviewed: https://review.openstack.org/85919
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=58c0f5edbf2e61a422e00a4b5cdb3315d6ed7005
Submitter: Jenkins
Branch: feature/ec

commit 0e366aa92214234f77709640c3eecd8a24f108b4
Author: Peter Portante <email address hidden>
Date: Mon Mar 31 23:51:43 2014 -0400

    Move module level setup under setup_package method

    Perform all the package level test setup under the setup_package
    method so that we only read the configuration file on disk when
    functional tests are run. This let's us "play nice" with other tests.

    Change-Id: I699d664bcef6754aac4ec6877830e745b764342f

commit bf292ae0cb64c8af8c2e1c8d5cad6b37a59113b1
Author: gholt <email address hidden>
Date: Thu Apr 3 23:06:13 2014 +0000

    Fixed error in container sync exc handling

    If container sync got a non-ClientException and then a ClientException
    during a get/put operation, it previously would break in the error
    handling.

    Change-Id: Ib2fa70270f3ec870bf60d5bbb3e8f514aeeb0927

commit de020f018999e3a1decd59b73bc363ae21c701a3
Author: Peter Portante <email address hidden>
Date: Thu Apr 3 12:07:42 2014 -0400

    Handle getting info on wrong database type

    Change-Id: I32f66f6a7683180a18a2807143d0910c75bf16f0

commit eaf6815465159a793ad715c28dbfb5c0aae94c31
Author: John Dickinson <email address hidden>
Date: Wed Apr 2 16:58:40 2014 -0700

    updates for 1.13.1 release

    Change-Id: I9a84c476e8d370c3a5dbc24db77a7258d521013f

commit 39f5eab890394fce7e2efb9ffc1938d8156ed989
Author: Yuan Zhou <email address hidden>
Date: Tue Apr 1 15:21:19 2014 +0800

    Clean up swift-{account, container}-info

    Reuse common code; add unit tests; ensured coverage was at 100%.

    Change-Id: Id6fcc7cb07fd178e00d43968e3e2cc03226fdc05

commit 44b39417baffb6047ca378e33d6694b5db7fc108
Author: Peter Portante <email address hidden>
Date: Mon Mar 31 23:22:49 2014 -0400

    Read the configuration once for all func tests

    Merge the swift_testing module into the functional test module itself,
    so that we can read the configuration once for all unit tests, sharing
    the same constraints.

    Change-Id: I9fbbfdade9adca329cd79f7d4291ba009327c842

commit 5ea6c88128ed966ba419848064680dec34850fda
Author: Peter Portante <email address hidden>
Date: Mon Mar 31 22:56:17 2014 -0400

    Only change collation for functional tests

    The unconditional module-level change of the locale collation can
    affect other tests run under nose. To avoid this, make the change at
    the package level, and restore it when finished.

    Change-Id: Iacda42aa7155f1cfa7d0dcadbf73b961dfb4b923

commit 07fcf50c3ac8d95d59901992affea82c45719340
Author: Peter Portante <email address hidden>
Date: Wed Apr 2 16:16:21 2014 -0400

    Rework use of constraints to ease testing

    Prior to this patch both mainline code and testing modules imported
    and used constraints directly into their own namespace, or relied on
    the namespace of other modules that were not the constraints
    module. This meant that if a unit test wanted to change a constraint
 ...

Thierry Carrez (ttx)
Changed in swift:
milestone: 1.13.1-rc1 → 1.13.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.