Skip to content

Commit fd0e6bf

Browse files
authored
Merge pull request #2195 from tseaver/2163-2192-pubsub-system-tests-unavailable
Kill off 'DEFAULT_TOPIC_NAME'.
2 parents eea013e + 04a38e2 commit fd0e6bf

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

system_tests/pubsub.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
from system_test_utils import unique_resource_id
2929

3030

31-
DEFAULT_TOPIC_NAME = 'subscribe-me' + unique_resource_id('-')
32-
33-
3431
class Config(object):
3532
"""Run-time configuration to be modified at set-up.
3633
@@ -94,7 +91,8 @@ def _all_created(result):
9491
self.assertEqual(len(created), len(topics_to_create))
9592

9693
def test_create_subscription_defaults(self):
97-
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME)
94+
TOPIC_NAME = 'create-sub-def' + unique_resource_id('-')
95+
topic = Config.CLIENT.topic(TOPIC_NAME)
9896
self.assertFalse(topic.exists())
9997
topic.create()
10098
self.to_delete.append(topic)
@@ -108,7 +106,8 @@ def test_create_subscription_defaults(self):
108106
self.assertTrue(subscription.topic is topic)
109107

110108
def test_create_subscription_w_ack_deadline(self):
111-
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME)
109+
TOPIC_NAME = 'create-sub-ack' + unique_resource_id('-')
110+
topic = Config.CLIENT.topic(TOPIC_NAME)
112111
self.assertFalse(topic.exists())
113112
topic.create()
114113
self.to_delete.append(topic)
@@ -123,7 +122,8 @@ def test_create_subscription_w_ack_deadline(self):
123122
self.assertTrue(subscription.topic is topic)
124123

125124
def test_list_subscriptions(self):
126-
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME)
125+
TOPIC_NAME = 'list-sub' + unique_resource_id('-')
126+
topic = Config.CLIENT.topic(TOPIC_NAME)
127127
self.assertFalse(topic.exists())
128128
topic.create()
129129
self.to_delete.append(topic)
@@ -152,7 +152,8 @@ def _all_created(result):
152152

153153
def test_message_pull_mode_e2e(self):
154154
import operator
155-
topic = Config.CLIENT.topic(DEFAULT_TOPIC_NAME,
155+
TOPIC_NAME = 'message-e2e' + unique_resource_id('-')
156+
topic = Config.CLIENT.topic(TOPIC_NAME,
156157
timestamp_messages=True)
157158
self.assertFalse(topic.exists())
158159
topic.create()

0 commit comments

Comments
 (0)