Merge "db.sqlalchemy.session add [sql].idle_timeout"

changes/77/60877/4
Jenkins 9 years ago committed by Gerrit Code Review
commit 15ea4ffdbc
  1. 4
      openstack/common/db/sqlalchemy/session.py
  2. 4
      tests/unit/db/sqlalchemy/test_sqlalchemy.py

@ -289,7 +289,9 @@ database_opts = [
deprecated_opts=[cfg.DeprecatedOpt('sql_idle_timeout',
group='DEFAULT'),
cfg.DeprecatedOpt('sql_idle_timeout',
group='DATABASE')],
group='DATABASE'),
cfg.DeprecatedOpt('idle_timeout',
group='sql')],
help='timeout before idle sql connections are reaped'),
cfg.IntOpt('min_pool_size',
default=1,

@ -111,12 +111,14 @@ pool_timeout=7
self.assertEqual(self.conf.database.max_overflow, 101)
self.assertEqual(self.conf.database.pool_timeout, 5)
def test_dbapi_database_deprecated_parameters_sql_connection(self):
def test_dbapi_database_deprecated_parameters_sql(self):
path = self.create_tempfiles([['tmp', '[sql]\n'
'connection=test_sql_connection\n'
'idle_timeout=99\n'
]])[0]
self.conf(['--config-file', path])
self.assertEqual(self.conf.database.connection, 'test_sql_connection')
self.assertEqual(self.conf.database.idle_timeout, 99)
class SessionErrorWrapperTestCase(test_base.DbTestCase):

Loading…
Cancel
Save