2 @message |
assert
+ Restore FAILED:
+ do not recognize record type 0
+ -Exiting before completion due to errors
+ (336330795,)
LOG DETAILS:
2025-02-25 17:08:14.032
2025-02-25 17:08:14.045 act = <firebird.qa.plugin.Action object at [hex]>
2025-02-25 17:08:14.061 db_tmp = <firebird.qa.plugin.Database object at [hex]>
2025-02-25 17:08:14.076 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-02-25 17:08:14.085
2025-02-25 17:08:14.093 @pytest.mark.version('>=4.0')
2025-02-25 17:08:14.100 def test_1(act: Action, db_tmp: Database, capsys):
2025-02-25 17:08:14.107
2025-02-25 17:08:14.115 #with act.db.connect() as con:
2025-02-25 17:08:14.123 # if act.is_version('>=5'):
2025-02-25 17:08:14.137 # pytest.skip("currently works only in FB 4.x.")
2025-02-25 17:08:14.148
2025-02-25 17:08:14.161 backup = BytesIO()
2025-02-25 17:08:14.172 with act.connect_server() as srv:
2025-02-25 17:08:14.184 # 5.0.0.882:
2025-02-25 17:08:14.197 # firebird.driver.types.DatabaseError: message length error (encountered 32, expected 65568)
2025-02-25 17:08:14.210 # -gds_$receive failed
2025-02-25 17:08:14.225 # -Exiting before completion due to errors
2025-02-25 17:08:14.240 #
2025-02-25 17:08:14.251 srv.database.local_backup(database=act.db.db_path, backup_stream=backup)
2025-02-25 17:08:14.260 backup.seek(0)
2025-02-25 17:08:14.269
2025-02-25 17:08:14.281 # 5.0.1.1318, 6.0.0.219 (before fix):
2025-02-25 17:08:14.291 # firebird.driver.types.DatabaseError: expected record length
2025-02-25 17:08:14.298 # -Exiting before completion due to errors
2025-02-25 17:08:14.305 #
2025-02-25 17:08:14.318 try:
2025-02-25 17:08:14.324 srv.database.local_restore(backup_stream = backup, database = db_tmp.db_path, flags = SrvRestoreFlag.REPLACE)
2025-02-25 17:08:14.330 # Validation must pass without any output:
2025-02-25 17:08:14.343 act.gfix(switches=['-v', '-full', db_tmp.db_path], combine_output = True, io_enc = locale.getpreferredencoding())
2025-02-25 17:08:14.351 except DatabaseError as e:
2025-02-25 17:08:14.359 print('Restore FAILED:')
2025-02-25 17:08:14.367 print(e.__str__())
2025-02-25 17:08:14.373 print(e.gds_codes)
2025-02-25 17:08:14.380 finally:
2025-02-25 17:08:14.387 if Path(db_tmp.db_path).is_file():
2025-02-25 17:08:14.394 Path(db_tmp.db_path).unlink()
2025-02-25 17:08:14.403
2025-02-25 17:08:14.416 act.expected_stdout = ''
2025-02-25 17:08:14.427 act.stdout = capsys.readouterr().out
2025-02-25 17:08:14.436 > assert act.clean_stdout == act.clean_expected_stdout
2025-02-25 17:08:14.443 E assert
2025-02-25 17:08:14.454 E + Restore FAILED:
2025-02-25 17:08:14.463 E + do not recognize record type 0
2025-02-25 17:08:14.471 E + -Exiting before completion due to errors
2025-02-25 17:08:14.483 E + (336330795,)
2025-02-25 17:08:14.493
2025-02-25 17:08:14.502 tests/bugs/gh_7436_test.py:284: AssertionError
2025-02-25 17:08:14.510 ---------------------------- Captured stdout setup -----------------------------
2025-02-25 17:08:14.522 Creating db: localhost:/var/tmp/qa_2024/test_11497/test.fdb [page_size=None, sql_dialect=None, charset='WIN1251', user=SYSDBA, password=masterkey]
|
3 #text |
act = <firebird.qa.plugin.Action pytest object at [hex]>
db_tmp = <firebird.qa.plugin.Database pytest object at [hex]>
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>
@pytest.mark.version('>=4.0')
def test_1(act: Action, db_tmp: Database, capsys):
#with act.db.connect() as con:
# if act.is_version('>=5'):
# pytest.skip("currently works only in FB 4.x.")
backup = BytesIO()
with act.connect_server() as srv:
# 5.0.0.882:
# firebird.driver.types.DatabaseError: message length error (encountered 32, expected 65568)
# -gds_$receive failed
# -Exiting before completion due to errors
#
srv.database.local_backup(database=act.db.db_path, backup_stream=backup)
backup.seek(0)
# 5.0.1.1318, 6.0.0.219 (before fix):
# firebird.driver.types.DatabaseError: expected record length
# -Exiting before completion due to errors
#
try:
srv.database.local_restore(backup_stream = backup, database = db_tmp.db_path, flags = SrvRestoreFlag.REPLACE)
# Validation must pass without any output:
act.gfix(switches=['-v', '-full', db_tmp.db_path], combine_output = True, io_enc = locale.getpreferredencoding())
except DatabaseError as e:
print('Restore FAILED:')
print(e.__str__())
print(e.gds_codes)
finally:
if Path(db_tmp.db_path).is_file():
Path(db_tmp.db_path).unlink()
act.expected_stdout = ''
act.stdout = capsys.readouterr().out
> assert act.clean_stdout == act.clean_expected_stdout
E assert
E + Restore FAILED:
E + do not recognize record type 0
E + -Exiting before completion due to errors
E + (336330795,)
tests/bugs/gh_7436_test.py:284: AssertionError
|