diff --git a/pubsub/tests/system.py b/pubsub/tests/system.py index bbc4b527db8eb..eddfd1274da08 100644 --- a/pubsub/tests/system.py +++ b/pubsub/tests/system.py @@ -348,7 +348,10 @@ def test_create_snapshot(self): # There is no GET method for snapshot, so check existence using # list - retry = RetryResult(lambda result: result, max_tries=4) + def retry_predicate(result): + return len(result) > len(before_snapshots) + + retry = RetryResult(retry_predicate, max_tries=5) after_snapshots = retry(_consume_snapshots)(Config.CLIENT) self.assertEqual(len(before_snapshots) + 1, len(after_snapshots)) @@ -361,7 +364,6 @@ def full_name(obj): with self.assertRaises(Conflict): snapshot.create() - def test_seek(self): TOPIC_NAME = 'seek-e2e' + unique_resource_id('-') topic = Config.CLIENT.topic(TOPIC_NAME,