mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\functional\replication\test_oltp_emul_ddl.py: problems that can occus during initial DDL must be reflected in the variable with distinct name: 'out_init'.
This commit is contained in:
parent
4eb16ac704
commit
e9ee32d4af
@ -412,7 +412,8 @@ def get_replication_log(a: Action):
|
||||
def test_1(act_db_main: Action, act_db_repl: Action, tmp_oltp_build_sql: Path, tmp_oltp_build_log: Path, capsys):
|
||||
|
||||
tmp_oltp_sql_files = []
|
||||
out_prep, out_main, out_drop = '', '', ''
|
||||
|
||||
out_prep, out_init, out_main, out_drop = '', '', '', ''
|
||||
# Obtain full path + filename for DB_MAIN and DB_REPL aliases.
|
||||
# NOTE: we must NOT use 'a.db.db_path' for ALIASED databases!
|
||||
# It will return '.' rather than full path+filename.
|
||||
@ -507,7 +508,7 @@ def test_1(act_db_main: Action, act_db_repl: Action, tmp_oltp_build_sql: Path,
|
||||
|
||||
act_db_main.isql(switches=['-q', '-nod'], input_file = str(tmp_oltp_build_sql), io_enc = locale.getpreferredencoding(), combine_output = True)
|
||||
if act_db_main.return_code:
|
||||
out_prep = act_db_main.clean_stdout
|
||||
out_init= '\n'.join( ('act_db_main.return_code = %d' % act_db_main.return_code, act_db_main.clean_stdout ) )
|
||||
|
||||
act_db_main.reset()
|
||||
|
||||
@ -519,7 +520,7 @@ def test_1(act_db_main: Action, act_db_repl: Action, tmp_oltp_build_sql: Path,
|
||||
|
||||
repl_log_new = get_replication_log(act_db_main)
|
||||
|
||||
if out_prep:
|
||||
if out_init:
|
||||
# Some problem raised during execution of initial SQL
|
||||
pass
|
||||
else:
|
||||
@ -561,7 +562,7 @@ def test_1(act_db_main: Action, act_db_repl: Action, tmp_oltp_build_sql: Path,
|
||||
# Must be EMPTY:
|
||||
out_drop = capsys.readouterr().out
|
||||
|
||||
if [ x for x in (out_prep, out_main, out_drop) if x.strip() ]:
|
||||
if [ x for x in (out_prep, out_init, out_main, out_drop) if x.strip() ]:
|
||||
# We have a problem either with DDL/DML or with dropping DB objects.
|
||||
# First, we have to RECREATE both master and slave databases
|
||||
# (otherwise further execution of this test or other replication-related tests most likely will fail):
|
||||
@ -572,6 +573,8 @@ def test_1(act_db_main: Action, act_db_repl: Action, tmp_oltp_build_sql: Path,
|
||||
print('Problem(s) detected:')
|
||||
if out_prep.strip():
|
||||
print('out_prep:\n', out_prep)
|
||||
if out_init.strip():
|
||||
print('out_init:\n', out_init)
|
||||
if out_main.strip():
|
||||
print('out_main:\n', out_main)
|
||||
if out_drop.strip():
|
||||
|
Loading…
Reference in New Issue
Block a user