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

Drop the ultra-flaky test for orphaned subscriptions. #2215

Merged
merged 1 commit into from
Sep 2, 2016
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
7 changes: 4 additions & 3 deletions system_tests/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def test_create_subscription_w_ack_deadline(self):
def test_list_subscriptions(self):
TOPIC_NAME = 'list-sub' + unique_resource_id('-')
topic = Config.CLIENT.topic(TOPIC_NAME)
self.assertFalse(retry_unavailable(topic.exists)())
topic.create()

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

self.to_delete.append(topic)
empty, _ = topic.list_subscriptions()
Expand Down Expand Up @@ -264,6 +263,9 @@ def test_subscription_iam_policy(self):
new_policy = subscription.set_iam_policy(policy)
self.assertEqual(new_policy.viewers, policy.viewers)

# This test is ultra-flaky. See:
# https://github.com/GoogleCloudPlatform/gcloud-python/issues/2080
@unittest.expectedFailure
def test_fetch_delete_subscription_w_deleted_topic(self):
from gcloud.iterator import MethodIterator
TO_DELETE = 'delete-me' + unique_resource_id('-')
Expand Down Expand Up @@ -292,8 +294,7 @@ def _found_orphan(result):
def _no_topic(instance):
return instance.topic is None

# Wait for the topic to clear: up to 127 seconds (2 ** 7 - 1)
retry_until_no_topic = RetryInstanceState(_no_topic, max_tries=8)
retry_until_no_topic = RetryInstanceState(_no_topic)
retry_until_no_topic(orphaned.reload)()

self.assertTrue(orphaned.topic is None)
Expand Down