2 @message |
assert
Sweep is started by SYSDBA
Sweep is finished
+ Sweep is started by SYSDBA
+ Sweep is finished
LOG DETAILS:
2024-05-12 19:15:48.475
2024-05-12 19:15:48.481 act = <firebird.qa.plugin.Action object at [hex]>
2024-05-12 19:15:48.487 isql_script = PosixPath('/var/tmp/qa_2024/test_1492/test-script.sql')
2024-05-12 19:15:48.494 isql_output = PosixPath('/var/tmp/qa_2024/test_1492/test-script.out')
2024-05-12 19:15:48.501 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2024-05-12 19:15:48.508
2024-05-12 19:15:48.515 @pytest.mark.version('>=3')
2024-05-12 19:15:48.522 def test_1(act: Action, isql_script: Path, isql_output: Path, capsys):
2024-05-12 19:15:48.528 isql_script.write_text(test_script)
2024-05-12 19:15:48.533 with act.connect_server() as srv:
2024-05-12 19:15:48.538 # Get content of firebird.log BEFORE test
2024-05-12 19:15:48.544 log_before = act.get_firebird_log()
2024-05-12 19:15:48.551 with open(isql_output, mode='w') as isql_out:
2024-05-12 19:15:48.558 p_isql = subprocess.Popen([act.vars['isql'], '-u', act.db.user, '-pas',
2024-05-12 19:15:48.565 act.db.password, act.db.dsn, '-i', str(isql_script)],
2024-05-12 19:15:48.571 stdout=isql_out, stderr=subprocess.STDOUT)
2024-05-12 19:15:48.575 time.sleep(2)
2024-05-12 19:15:48.580 # LAUNCH SWEEP while ISQL is working
2024-05-12 19:15:48.587 srv.database.sweep(database=act.db.db_path)
2024-05-12 19:15:48.593 p_isql.terminate()
2024-05-12 19:15:48.599 # Get content of firebird.log AFTER test
2024-05-12 19:15:48.605 log_after = act.get_firebird_log()
2024-05-12 19:15:48.610 for line in unified_diff(log_before, log_after):
2024-05-12 19:15:48.615 if line.startswith('+') and line.split('+'):
2024-05-12 19:15:48.619 print(line.replace('+', ' '))
2024-05-12 19:15:48.624 act.expected_stdout = expected_stdout
2024-05-12 19:15:48.629 act.stdout = capsys.readouterr().out
2024-05-12 19:15:48.634 > assert act.clean_stdout == act.clean_expected_stdout
2024-05-12 19:15:48.639 E assert
2024-05-12 19:15:48.644 E Sweep is started by SYSDBA
2024-05-12 19:15:48.649 E Sweep is finished
2024-05-12 19:15:48.653 E + Sweep is started by SYSDBA
2024-05-12 19:15:48.658 E + Sweep is finished
2024-05-12 19:15:48.663
2024-05-12 19:15:48.667 tests/bugs/core_2879_test.py:82: AssertionError
2024-05-12 19:15:48.672 ---------------------------- Captured stdout setup -----------------------------
2024-05-12 19:15:48.677 Cached db: db-12.0-None-None-NONE.fdb [page_size=None, sql_dialect=None, charset='NONE'
|
3 #text |
act = <firebird.qa.plugin.Action pytest object at [hex]>
isql_script = PosixPath('/var/tmp/qa_2024/test_1492/test-script.sql')
isql_output = PosixPath('/var/tmp/qa_2024/test_1492/test-script.out')
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>
@pytest.mark.version('>=3')
def test_1(act: Action, isql_script: Path, isql_output: Path, capsys):
isql_script.write_text(test_script)
with act.connect_server() as srv:
# Get content of firebird.log BEFORE test
log_before = act.get_firebird_log()
with open(isql_output, mode='w') as isql_out:
p_isql = subprocess.Popen([act.vars['isql'], '-u', act.db.user, '-pas',
act.db.password, act.db.dsn, '-i', str(isql_script)],
stdout=isql_out, stderr=subprocess.STDOUT)
time.sleep(2)
# LAUNCH SWEEP while ISQL is working
srv.database.sweep(database=act.db.db_path)
p_isql.terminate()
# Get content of firebird.log AFTER test
log_after = act.get_firebird_log()
for line in unified_diff(log_before, log_after):
if line.startswith('+') and line.split('+'):
print(line.replace('+', ' '))
act.expected_stdout = expected_stdout
act.stdout = capsys.readouterr().out
> assert act.clean_stdout == act.clean_expected_stdout
E assert
E Sweep is started by SYSDBA
E Sweep is finished
E + Sweep is started by SYSDBA
E + Sweep is finished
tests/bugs/core_2879_test.py:82: AssertionError
|