From 04a38e26745b3ab6221be3e45ef5dc61c682e325 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 25 Aug 2016 09:46:15 -0400 Subject: [PATCH] Kill off 'DEFAULT_TOPIC_NAME'. The hypothesis is that we are seeing flakiness due to rapid creation / deletion cycles on topics with the shared name. Towards #2163, #2192. --- system_tests/pubsub.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/system_tests/pubsub.py b/system_tests/pubsub.py index fff5e9153bc0..6a420fccd197 100644 --- a/system_tests/pubsub.py +++ b/system_tests/pubsub.py @@ -28,9 +28,6 @@ from system_test_utils import unique_resource_id -DEFAULT_TOPIC_NAME = 'subscribe-me' + unique_resource_id('-') - - class Config(object): """Run-time configuration to be modified at set-up. @@ -94,7 +91,8 @@ def _all_created(result): self.assertEqual(len(created), len(topics_to_create)) def test_create_subscription_defaults(self): - topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME) + TOPIC_NAME = 'create-sub-def' + unique_resource_id('-') + topic = Config.CLIENT.topic(TOPIC_NAME) self.assertFalse(topic.exists()) topic.create() self.to_delete.append(topic) @@ -108,7 +106,8 @@ def test_create_subscription_defaults(self): self.assertTrue(subscription.topic is topic) def test_create_subscription_w_ack_deadline(self): - topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME) + TOPIC_NAME = 'create-sub-ack' + unique_resource_id('-') + topic = Config.CLIENT.topic(TOPIC_NAME) self.assertFalse(topic.exists()) topic.create() self.to_delete.append(topic) @@ -123,7 +122,8 @@ def test_create_subscription_w_ack_deadline(self): self.assertTrue(subscription.topic is topic) def test_list_subscriptions(self): - topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME) + TOPIC_NAME = 'list-sub' + unique_resource_id('-') + topic = Config.CLIENT.topic(TOPIC_NAME) self.assertFalse(topic.exists()) topic.create() self.to_delete.append(topic) @@ -152,7 +152,8 @@ def _all_created(result): def test_message_pull_mode_e2e(self): import operator - topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME, + TOPIC_NAME = 'message-e2e' + unique_resource_id('-') + topic = Config.CLIENT.topic(TOPIC_NAME, timestamp_messages=True) self.assertFalse(topic.exists()) topic.create()