Skip to content
Merged
Show file tree
Hide file tree
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 system_tests/bigtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@


CENTRAL_1C_ZONE = 'us-central1-c'
CLUSTER_ID = 'gcloud-py' + unique_resource_id('-')
CLUSTER_ID = 'gcloud' + unique_resource_id('-')
CLUSTER_ID = CLUSTER_ID[:30] # Cluster IDs can't exceed 30 chars.
TABLE_ID = 'gcloud-python-test-table'
COLUMN_FAMILY_ID1 = u'col-fam-id1'
COLUMN_FAMILY_ID2 = u'col-fam-id2'
Expand Down Expand Up @@ -148,7 +149,8 @@ def test_reload(self):
self.assertEqual(cluster.serve_nodes, Config.CLUSTER.serve_nodes)

def test_create_cluster(self):
cluster_id = '%s-a' % (CLUSTER_ID,)
cluster_id = 'new' + unique_resource_id('-')
cluster_id = cluster_id[:30] # Cluster IDs can't exceed 30 chars.
cluster = Config.CLIENT.cluster(CENTRAL_1C_ZONE, cluster_id)
operation = cluster.create()
# Make sure this cluster gets deleted after the test case.
Expand Down
3 changes: 2 additions & 1 deletion system_tests/bigtable_happybase.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
_FIRST_ELT = operator.itemgetter(0)
_helpers.PROJECT = TESTS_PROJECT
ZONE = 'us-central1-c'
CLUSTER_ID = 'gcloud-py' + unique_resource_id('-')
CLUSTER_ID = 'gcloud' + unique_resource_id('-')
CLUSTER_ID = CLUSTER_ID[:30] # Cluster IDs can't exceed 30 chars.
TABLE_NAME = 'table-name'
ALT_TABLE_NAME = 'other-table'
TTL_FOR_TEST = 3
Expand Down
4 changes: 2 additions & 2 deletions system_tests/system_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ def unique_resource_id(delimiter='_'):
if build_id == '':
return '%s%d' % (delimiter, 1000 * time.time())
else:
return '%s%d%s%s' % (delimiter, time.time(),
delimiter, build_id)
return '%s%s%s%d' % (delimiter, build_id,
delimiter, time.time())