Cleanup timeutils override in tests/functional/test_servers

The ServersTest._force_reclaim helper method sets up a timeutils
override but never removes it. This allows the override to potentially
leak into other tests causing spurious failures in completely unrelated
tests.

Change-Id: I637a1dd6301e5645a47dbd65026acfab83e6ae26
Closes-bug: 1399817
This commit is contained in:
Johannes Erdfelt 2014-12-05 14:55:52 -08:00
parent eb9838e6fb
commit 39e2a51e4d
1 changed files with 1 additions and 0 deletions

View File

@ -160,6 +160,7 @@ class ServersTest(integrated_helpers._IntegratedTestBase):
# old enough to be expired
the_past = timeutils.utcnow() + datetime.timedelta(hours=1)
timeutils.set_time_override(override_time=the_past)
self.addCleanup(timeutils.clear_time_override)
ctxt = context.get_admin_context()
self.compute._reclaim_queued_deletes(ctxt)