Skip to content

Commit 7036734

Browse files
committed
skip dbapi test which depends on session delete
1 parent 8e8449d commit 7036734

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/system/test_dbapi.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
from google.cloud.spanner_v1 import JsonObject
3333
from google.cloud.spanner_v1 import gapic_version as package_version
3434
from google.api_core.datetime_helpers import DatetimeWithNanoseconds
35+
36+
from google.cloud.spanner_v1.database_sessions_manager import TransactionType
3537
from . import _helpers
38+
from tests._helpers import is_multiplexed_enabled
3639

3740
DATABASE_NAME = "dbapi-txn"
3841
SPANNER_RPC_PREFIX = "/google.spanner.v1.Spanner/"
@@ -169,6 +172,12 @@ def test_commit_exception(self):
169172
"""Test that if exception during commit method is caught, then
170173
subsequent operations on same Cursor and Connection object works
171174
properly."""
175+
176+
if is_multiplexed_enabled(transaction_type=TransactionType.READ_WRITE):
177+
pytest.skip(
178+
"Mutiplexed session can't be deleted and this test relies on session deletion."
179+
)
180+
172181
self._execute_common_statements(self._cursor)
173182
# deleting the session to fail the commit
174183
self._conn._session.delete()

0 commit comments

Comments
 (0)