Skip to content

Commit

Permalink
Exercise session labels in systests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Aug 2, 2018
1 parent 69c00b5 commit 6b57b0a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spanner/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class TestDatabaseAPI(unittest.TestCase, _TestData):

@classmethod
def setUpClass(cls):
pool = BurstyPool()
pool = BurstyPool(labels={'testcase': 'database_api'})
cls._db = Config.INSTANCE.database(
cls.DATABASE_NAME, ddl_statements=DDL_STATEMENTS, pool=pool)
operation = cls._db.create()
Expand All @@ -264,7 +264,7 @@ def test_list_databases(self):
self.assertTrue(self._db.name in database_names)

def test_create_database(self):
pool = BurstyPool()
pool = BurstyPool(labels={'testcase': 'create_database'})
temp_db_id = 'temp_db' + unique_resource_id('_')
temp_db = Config.INSTANCE.database(temp_db_id, pool=pool)
operation = temp_db.create()
Expand Down Expand Up @@ -311,7 +311,7 @@ def test_table_not_found(self):
'https://github.com/GoogleCloudPlatform/google-cloud-python/issues/'
'5629'))
def test_update_database_ddl(self):
pool = BurstyPool()
pool = BurstyPool(labels={'testcase': 'update_database_ddl'})
temp_db_id = 'temp_db' + unique_resource_id('_')
temp_db = Config.INSTANCE.database(temp_db_id, pool=pool)
create_op = temp_db.create()
Expand Down Expand Up @@ -434,7 +434,7 @@ class TestSessionAPI(unittest.TestCase, _TestData):

@classmethod
def setUpClass(cls):
pool = BurstyPool()
pool = BurstyPool(labels={'testcase': 'session_api'})
cls._db = Config.INSTANCE.database(
cls.DATABASE_NAME, ddl_statements=DDL_STATEMENTS, pool=pool)
operation = cls._db.create()
Expand Down Expand Up @@ -901,7 +901,7 @@ def test_read_w_index(self):
EXTRA_DDL = [
'CREATE INDEX contacts_by_last_name ON contacts(last_name)',
]
pool = BurstyPool()
pool = BurstyPool(labels={'testcase': 'read_w_index'})
temp_db = Config.INSTANCE.database(
'test_read' + unique_resource_id('_'),
ddl_statements=DDL_STATEMENTS + EXTRA_DDL,
Expand Down

0 comments on commit 6b57b0a

Please sign in to comment.