diff options
author | Mike Fedosin <mfedosin@mirantis.com> | 2015-04-08 15:00:27 +0300 |
---|---|---|
committer | John Dickinson <me@not.mn> | 2015-04-14 16:00:37 -0700 |
commit | b76d8c5156c65e3ae6ead5213e40f70d80f7fa9d (patch) | |
tree | e74ec7e257a6c02bc593d5c1fe9f404f37bc5579 | |
parent | 7518213be11451865377103d5085e1c00dd44364 (diff) | |
download | swift-b76d8c5156c65e3ae6ead5213e40f70d80f7fa9d.tar.gz |
Fix broken test_policy_IO_override test
Since the existing check depends on how quickly the test
passes, it causes to the unpredictable behavior and may break
the test.
This commit removes the unnecessary dependency on the
current time and leaves only the check that timestamp is
greater than 0.
Change-Id: I3321e9aba0df52cb78523710b26f310f35801674
Closes-Bug: #1441599
-rw-r--r-- | test/unit/proxy/test_server.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index 08d3b363e..901ff925b 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -1291,8 +1291,7 @@ class TestObjectController(unittest.TestCase): try: df.open() except DiskFileNotExist as e: - now = time.time() - self.assert_(now - 1 < float(e.timestamp) < now + 1) + self.assert_(float(e.timestamp) > 0) else: self.fail('did not raise DiskFileNotExist') |