Skip to content
Merged
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
7 changes: 4 additions & 3 deletions spanner/tests/system/test_system.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,6 @@
else:
INSTANCE_ID = os.environ.get('GOOGLE_CLOUD_TESTS_SPANNER_INSTANCE',
'google-cloud-python-systest')
DATABASE_ID = 'test_database'
EXISTING_INSTANCES = []
COUNTERS_TABLE = 'counters'
COUNTERS_COLUMNS = ('name', 'value')
Expand DownExpand Up@@ -237,12 +236,13 @@ def _check_row_data(self, row_data, expected=None):


class TestDatabaseAPI(unittest.TestCase, _TestData):
DATABASE_NAME = 'test_database' + unique_resource_id('_')

@classmethod
def setUpClass(cls):
pool = BurstyPool()
cls._db = Config.INSTANCE.database(
DATABASE_ID, ddl_statements=DDL_STATEMENTS, pool=pool)
cls.DATABASE_NAME, ddl_statements=DDL_STATEMENTS, pool=pool)
cls._db.create()

@classmethod
Expand DownExpand Up@@ -376,6 +376,7 @@ def _unit_of_work(transaction, name):


class TestSessionAPI(unittest.TestCase, _TestData):
DATABASE_NAME = 'test_sessions' + unique_resource_id('_')
ALL_TYPES_TABLE = 'all_types'
ALL_TYPES_COLUMNS = (
'list_goes_on',
Expand DownExpand Up@@ -407,7 +408,7 @@ class TestSessionAPI(unittest.TestCase, _TestData):
def setUpClass(cls):
pool = BurstyPool()
cls._db = Config.INSTANCE.database(
DATABASE_ID, ddl_statements=DDL_STATEMENTS, pool=pool)
cls.DATABASE_NAME, ddl_statements=DDL_STATEMENTS, pool=pool)
operation = cls._db.create()
operation.result(30) # raises on failure / timeout.

Expand Down