Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-flake the snapshot system test. #3780

Merged
merged 2 commits into from
Aug 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pubsub/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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,
Expand Down