Disable SQLite synchronous mode during tests

SQLite uses synchronous mode by default, which will synchronously write
data to disk. This will increase durability of data at the expense of
performance. The test suite does not need data to be durably written
to disk, so disabling synchronous mode results in a speeding up the
full test suite by about 20 seconds.

Change-Id: I5ca1ab1e8691e912d801fe1002dff752c82f3d5d
This commit is contained in:
Johannes Erdfelt 2011-10-26 17:00:21 +00:00
parent 6eaa7a807c
commit 844d37c8cc
2 changed files with 2 additions and 0 deletions

View File

@ -377,6 +377,7 @@ DEFINE_string('logdir', None, 'output to a per-service log file in named '
'directory') 'directory')
DEFINE_string('logfile_mode', '0644', 'Default file mode of the logs.') DEFINE_string('logfile_mode', '0644', 'Default file mode of the logs.')
DEFINE_string('sqlite_db', 'nova.sqlite', 'file name for sqlite') DEFINE_string('sqlite_db', 'nova.sqlite', 'file name for sqlite')
DEFINE_bool('sqlite_synchronous', True, 'Synchronous mode for sqlite')
DEFINE_string('sql_connection', DEFINE_string('sql_connection',
'sqlite:///$state_path/$sqlite_db', 'sqlite:///$state_path/$sqlite_db',
'connection string for sql database') 'connection string for sql database')

View File

@ -39,3 +39,4 @@ FLAGS['verbose'].SetDefault(True)
FLAGS['sqlite_db'].SetDefault("tests.sqlite") FLAGS['sqlite_db'].SetDefault("tests.sqlite")
FLAGS['use_ipv6'].SetDefault(True) FLAGS['use_ipv6'].SetDefault(True)
FLAGS['flat_network_bridge'].SetDefault('br100') FLAGS['flat_network_bridge'].SetDefault('br100')
FLAGS['sqlite_synchronous'].SetDefault(False)