Commit bb7d064e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! ERP5Site: add erp5_sql_isolated_connection.

parent 453cdf79
...@@ -101,7 +101,6 @@ def _getConnectionStringDict(): ...@@ -101,7 +101,6 @@ def _getConnectionStringDict():
connection_string_dict = {} connection_string_dict = {}
default = os.environ.get('erp5_sql_connection_string') default = os.environ.get('erp5_sql_connection_string')
for connection in ('erp5_sql_connection_string', for connection in ('erp5_sql_connection_string',
'erp5_sql_read_committed_connection_string',
'erp5_sql_deferred_connection_string', 'erp5_sql_deferred_connection_string',
# default value for transactionless is derived from value # default value for transactionless is derived from value
# for cmf_activity, so process it last # for cmf_activity, so process it last
...@@ -112,7 +111,7 @@ def _getConnectionStringDict(): ...@@ -112,7 +111,7 @@ def _getConnectionStringDict():
connection = 'erp5_sql_transactionless_connection_string' connection = 'erp5_sql_transactionless_connection_string'
if os.environ.get(connection, connection_string): if os.environ.get(connection, connection_string):
connection_string_dict[connection] = \ connection_string_dict[connection] = \
os.environ.get(connection, re.sub(r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)', r'\1-\3', connection_string)) os.environ.get(connection, '-' + connection_string)
return connection_string_dict return connection_string_dict
def _getConversionServerUrlList(): def _getConversionServerUrlList():
......
...@@ -58,13 +58,10 @@ Options: ...@@ -58,13 +58,10 @@ Options:
--erp5_sql_connection_string=STRING --erp5_sql_connection_string=STRING
ZSQL Connection string for erp5_sql_connection, by ZSQL Connection string for erp5_sql_connection, by
default, it will use "test test" default, it will use "test test"
--erp5_sql_read_committed_connection_string=STRING
ZSQL Connection string for erp5_sql_read_committed_connection
(if unset, defaults to erp5_sql_connection_string with "!READ-COMMITTED")
--cmf_activity_sql_connection_string=STRING --cmf_activity_sql_connection_string=STRING
ZSQL Connection string for ZSQL Connection string for
cmf_activity_sql_connection (if unset, defaults to cmf_activity_sql_connection (if unset, defaults to
erp5_sql_read_committed_connection_string) erp5_sql_connection_string)
--extra_sql_connection_string_list=STRING --extra_sql_connection_string_list=STRING
Used when 2 or more ZSQL connection strings are Used when 2 or more ZSQL connection strings are
needed. By defaut, it will take the last four needed. By defaut, it will take the last four
...@@ -747,7 +744,6 @@ def main(argument_list=None): ...@@ -747,7 +744,6 @@ def main(argument_list=None):
"firefox_bin=", "firefox_bin=",
"xvfb_bin=", "xvfb_bin=",
"recreate_catalog=", "erp5_sql_connection_string=", "recreate_catalog=", "erp5_sql_connection_string=",
"erp5_sql_read_committed_connection_string=",
"cmf_activity_sql_connection_string=", "cmf_activity_sql_connection_string=",
"extra_sql_connection_string_list=", "extra_sql_connection_string_list=",
"conversion_server_url=", "conversion_server_url=",
...@@ -828,8 +824,6 @@ def main(argument_list=None): ...@@ -828,8 +824,6 @@ def main(argument_list=None):
os.environ["erp5_tests_recreate_catalog"] = arg os.environ["erp5_tests_recreate_catalog"] = arg
elif opt == "--erp5_sql_connection_string": elif opt == "--erp5_sql_connection_string":
os.environ["erp5_sql_connection_string"] = arg os.environ["erp5_sql_connection_string"] = arg
elif opt == "--erp5_sql_read_committed_connection_string":
os.environ["erp5_sql_read_committed_connection_string"] = arg
elif opt == "--cmf_activity_sql_connection_string": elif opt == "--cmf_activity_sql_connection_string":
os.environ["cmf_activity_sql_connection_string"] = arg os.environ["cmf_activity_sql_connection_string"] = arg
elif opt == "--extra_sql_connection_string_list": elif opt == "--extra_sql_connection_string_list":
...@@ -904,12 +898,6 @@ def main(argument_list=None): ...@@ -904,12 +898,6 @@ def main(argument_list=None):
elif opt == "--with_wendelin_core": elif opt == "--with_wendelin_core":
os.environ["with_wendelin_core"] = "1" os.environ["with_wendelin_core"] = "1"
if "erp5_sql_read_committed_connection_string" not in os.environ and "erp5_sql_connection_string" in os.environ:
os.environ["erp5_sql_read_committed_connection_string"] = re.sub(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)', r'\1!READ-COMMITTED \3', os.environ["erp5_sql_connection_string"])
if "cmf_activity_sql_connection_string" not in os.environ and "erp5_sql_read_committed_connection_string" in os.environ:
os.environ["cmf_activity_sql_connection_string"] = os.environ["erp5_sql_read_committed_connection_string"]
bt5_path_list += filter(None, bt5_path_list += filter(None,
os.environ.get("erp5_tests_bt5_path", "").split(',')) os.environ.get("erp5_tests_bt5_path", "").split(','))
valid_path_list = [] valid_path_list = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment