2 @message |
assert
+ Restore FAILED:
+ validation error for column "TEST"."F_0000000000000099", value "*** null ***"
+ -warning -- record could not be restored
+ -Exiting before completion due to errors
+ (335544347, 336330799, 336330835)
LOG DETAILS:
2024-05-14 12:12:48.942
2024-05-14 12:12:48.949 act = <firebird.qa.plugin.Action object at [hex]>
2024-05-14 12:12:48.956 db_tmp = <firebird.qa.plugin.Database object at [hex]>
2024-05-14 12:12:48.963 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2024-05-14 12:12:48.969
2024-05-14 12:12:48.975 @pytest.mark.version('>=4.0')
2024-05-14 12:12:48.982 def test_1(act: Action, db_tmp: Database, capsys):
2024-05-14 12:12:48.988
2024-05-14 12:12:48.995 #with act.db.connect() as con:
2024-05-14 12:12:49.001 # if act.is_version('>=5'):
2024-05-14 12:12:49.008 # pytest.skip("currently works only in FB 4.x.")
2024-05-14 12:12:49.014
2024-05-14 12:12:49.020 backup = BytesIO()
2024-05-14 12:12:49.026 with act.connect_server() as srv:
2024-05-14 12:12:49.032 # 5.0.0.882:
2024-05-14 12:12:49.039 # firebird.driver.types.DatabaseError: message length error (encountered 32, expected 65568)
2024-05-14 12:12:49.045 # -gds_$receive failed
2024-05-14 12:12:49.052 # -Exiting before completion due to errors
2024-05-14 12:12:49.058 #
2024-05-14 12:12:49.064 srv.database.local_backup(database=act.db.db_path, backup_stream=backup)
2024-05-14 12:12:49.071 backup.seek(0)
2024-05-14 12:12:49.077
2024-05-14 12:12:49.083 # 5.0.1.1318, 6.0.0.219 (before fix):
2024-05-14 12:12:49.089 # firebird.driver.types.DatabaseError: expected record length
2024-05-14 12:12:49.096 # -Exiting before completion due to errors
2024-05-14 12:12:49.102 #
2024-05-14 12:12:49.108 try:
2024-05-14 12:12:49.115 srv.database.local_restore(backup_stream = backup, database = db_tmp.db_path, flags = SrvRestoreFlag.REPLACE)
2024-05-14 12:12:49.121 # Validation must pass without any output:
2024-05-14 12:12:49.128 act.gfix(switches=['-v', '-full', db_tmp.db_path], combine_output = True, io_enc = locale.getpreferredencoding())
2024-05-14 12:12:49.134 except DatabaseError as e:
2024-05-14 12:12:49.140 print('Restore FAILED:')
2024-05-14 12:12:49.146 print(e.__str__())
2024-05-14 12:12:49.152 print(e.gds_codes)
2024-05-14 12:12:49.158 finally:
2024-05-14 12:12:49.165 if Path(db_tmp.db_path).is_file():
2024-05-14 12:12:49.172 Path(db_tmp.db_path).unlink()
2024-05-14 12:12:49.178
2024-05-14 12:12:49.185 act.expected_stdout = ''
2024-05-14 12:12:49.191 act.stdout = capsys.readouterr().out
2024-05-14 12:12:49.197 > assert act.clean_stdout == act.clean_expected_stdout
2024-05-14 12:12:49.203 E assert
2024-05-14 12:12:49.209 E + Restore FAILED:
2024-05-14 12:12:49.216 E + validation error for column "TEST"."F_0000000000000099", value "*** null ***"
2024-05-14 12:12:49.222 E + -warning -- record could not be restored
2024-05-14 12:12:49.228 E + -Exiting before completion due to errors
2024-05-14 12:12:49.234 E + (335544347, 336330799, 336330835)
2024-05-14 12:12:49.240
2024-05-14 12:12:49.246 tests/bugs/gh_7436_test.py:284: AssertionError
2024-05-14 12:12:49.252 ---------------------------- Captured stdout setup -----------------------------
2024-05-14 12:12:49.259 Creating db: localhost:/var/tmp/qa_2024/test_11470/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 + validation error for column "TEST"."F_0000000000000099", value "*** null ***"
E + -warning -- record could not be restored
E + -Exiting before completion due to errors
E + (335544347, 336330799, 336330835)
tests/bugs/gh_7436_test.py:284: AssertionError
|