summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-04-15 13:31:08 +0000
committerGerrit Code Review <review@openstack.org>2022-04-15 13:31:08 +0000
commita10eee97a963470f68fce21285efe92eac28791b (patch)
treeb2a8019021c92155692b29a4e03becf85a9bbc46
parent95e1dd6e82e88b123a6118bf421464495d16f290 (diff)
parent6ecce8996188a63ba18c607dd10dd58c9c21f2b8 (diff)
downloadoslo-db-a10eee97a963470f68fce21285efe92eac28791b.tar.gz
Merge "Don't call 'begin()' on existing transaction"11.3.0
-rw-r--r--oslo_db/tests/fixtures.py5
-rw-r--r--oslo_db/tests/sqlalchemy/test_utils.py3
2 files changed, 1 insertions, 7 deletions
diff --git a/oslo_db/tests/fixtures.py b/oslo_db/tests/fixtures.py
index 4646278..468dcae 100644
--- a/oslo_db/tests/fixtures.py
+++ b/oslo_db/tests/fixtures.py
@@ -45,11 +45,6 @@ class WarningsFixture(fixtures.Fixture):
message=r'The Session.autocommit parameter is deprecated .*',
category=sqla_exc.SADeprecationWarning)
- warnings.filterwarnings(
- 'once',
- message=r'Calling \.begin\(\) when a transaction is already .*',
- category=sqla_exc.SADeprecationWarning)
-
# ...plus things that aren't our fault
# FIXME(stephenfin): These are caused by sqlalchemy-migrate, not us,
diff --git a/oslo_db/tests/sqlalchemy/test_utils.py b/oslo_db/tests/sqlalchemy/test_utils.py
index 087f7ec..27ed640 100644
--- a/oslo_db/tests/sqlalchemy/test_utils.py
+++ b/oslo_db/tests/sqlalchemy/test_utils.py
@@ -700,8 +700,7 @@ class TestMigrationUtils(db_test_base._DbTestCase):
test_table.create(engine)
with engine.connect() as conn, conn.begin():
- with conn.begin():
- conn.execute(test_table.insert(), values)
+ conn.execute(test_table.insert(), values)
return test_table, values
def test_drop_old_duplicate_entries_from_table(self):