Skip to content

Commit

Permalink
Merge pull request #2215 from tseaver/2080-pubsub-drop-flaky-orphan-test
Browse files Browse the repository at this point in the history
Drop the ultra-flaky test for orphaned subscriptions.
  • Loading branch information
tseaver authored Sep 2, 2016
2 parents 6ce152c + 27eec9d commit efe359a
Showing 1 changed file with 4 additions and 3 deletions.
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()
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

0 comments on commit efe359a

Please sign in to comment.