Skip to content

Commit

Permalink
Make ttl test less likely to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
twidi committed Feb 15, 2017
1 parent af64a9b commit dcf34f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/contrib/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def test_ttl_of_stored_collection_should_be_set(self):
# test expire
stored_collection = collection.store(ttl=1)
self.assertTrue(0 <= self.connection.ttl(stored_collection.stored_key) <= 1)
time.sleep(1)
time.sleep(1.1)
self.assertFalse(self.connection.exists(stored_collection.stored_key))

def test_stored_key_should_be_the_given_one_if_set(self):
Expand All @@ -590,7 +590,7 @@ def test_stored_collection_should_raise_if_key_expired(self):

# try with short ttl
stored_collection = collection.store(ttl=1)
time.sleep(1)
time.sleep(1.1)
with self.assertRaises(DoesNotExist):
list(stored_collection)

Expand Down

0 comments on commit dcf34f3

Please sign in to comment.