Browse Source

Disable two tests due to sqlalchemy/sqlite bug

This patch adds a test skip for two tests that are impacted by the
recent sqlalchemy 1.3.16 release.
With this release, a patch[1], changes the default commit behavior
of a transaction. With this change we are seeing that the load
balancer created in the tree-create test disappears from the
transaction context during the test and the pool create call will
throw a foreign key error as the load balancer is not in the database.

It's not clear if this is purely a sqlalchemy, pysqlite, or sqlite3
bug at this time.
Given the requirements are already in freeze for the Ussuri release,
we are opting to disable the tests (we know only sqlite is impacted),
instead of attempt to blacklist 1.3.16 in requirements.

[1] 9ebbf8614a (diff-e9762e21a27d8e6c44db6f9dd4edc694R455)

Change-Id: I7910ebe4cff692bab67349bbf3e4ee4e24b5fa7a
changes/44/720244/1
Michael Johnson 2 years ago
parent
commit
ccd6c3875e
  1. 10
      octavia/tests/functional/db/test_repositories.py

10
octavia/tests/functional/db/test_repositories.py

@ -426,6 +426,11 @@ class AllRepositoriesTest(base.OctaviaDBTestBase):
self.assertEqual(pool, pool_dm_dict)
def test_create_load_balancer_tree(self):
self.skipTest("SLQAlchemy/PySqlite transaction handling is broken. "
"Version 1.3.16 of sqlachemy changes how sqlite3 "
"transactions are handled and this test fails as "
"The LB created early in this process now disappears "
"from the transaction context.")
project_id = uuidutils.generate_uuid()
member = {'project_id': project_id, 'ip_address': '11.0.0.1',
'protocol_port': 80, 'enabled': True, 'backup': False,
@ -505,6 +510,11 @@ class AllRepositoriesTest(base.OctaviaDBTestBase):
self.assertIsInstance(db_lb, models.LoadBalancer)
def test_sqlite_transactions_broken(self):
self.skipTest("SLQAlchemy/PySqlite transaction handling is broken. "
"Version 1.3.16 of sqlachemy changes how sqlite3 "
"transactions are handled and this test fails as "
"The LB created early in this process now disappears "
"from the transaction context.")
"""This test is a canary for pysqlite fixing transaction handling.
When this test starts failing, we can fix and un-skip the deadlock

Loading…
Cancel
Save