2 @message |
Network / firewall ?
assert
+ gbak: ERROR:Unable to complete network request to host "localhost".
+ gbak: ERROR: Failed to establish a connection.
+ gbak:Exiting before completion due to errors
LOG DETAILS:
2025-05-13 08:53:14.064
2025-05-13 08:53:14.064 act = <firebird.qa.plugin.Action object at [hex]>
2025-05-13 08:53:14.065 tmp_fbk = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11708/tmp_gh_8391.restored.fbk')
2025-05-13 08:53:14.065 tmp_log = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11708/tmp_gh_8391.restored.log')
2025-05-13 08:53:14.065 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-05-13 08:53:14.065
2025-05-13 08:53:14.065 @pytest.mark.version('>=4.0.6')
2025-05-13 08:53:14.065 def test_1(act: Action, tmp_fbk: Path, tmp_log: Path, capsys):
2025-05-13 08:53:14.065
2025-05-13 08:53:14.065 if act.get_server_architecture() != 'SuperServer':
2025-05-13 08:53:14.065 pytest.skip('Applies only to SuperServer')
2025-05-13 08:53:14.065
2025-05-13 08:53:14.065 # Scan line-by-line through databases.conf, find line starting with REQUIRED_ALIAS and extract name of file that
2025-05-13 08:53:14.065 # must be created in the $(dir_sampleDb)/qa/ folder.
2025-05-13 08:53:14.065 # NOTE: we have to SKIP lines which are commented out, i.e. if they starts with '#':
2025-05-13 08:53:14.065 p_required_alias_ptn = re.compile( '^(?!#)((^|\\s+)' + REQUIRED_ALIAS + ')\\s*=\\s*\\$\\(dir_sampleDb\\)/qa/', re.IGNORECASE )
2025-05-13 08:53:14.065 fname_in_dbconf = None
2025-05-13 08:53:14.065
2025-05-13 08:53:14.065 with open(act.home_dir/'databases.conf', 'r') as f:
2025-05-13 08:53:14.065 for line in f:
2025-05-13 08:53:14.065 if p_required_alias_ptn.search(line):
2025-05-13 08:53:14.065 # If databases.conf contains line like this:
2025-05-13 08:53:14.065 # tmp_8391_alias = $(dir_sampleDb)/qa/tmp_qa_8391.fdb
2025-05-13 08:53:14.066 # - then we extract filename: 'tmp_qa_8391.fdb' (see below):
2025-05-13 08:53:14.066 fname_in_dbconf = Path(line.split('=')[1].strip()).name
2025-05-13 08:53:14.066 break
2025-05-13 08:53:14.066
2025-05-13 08:53:14.066 # if 'fname_in_dbconf' remains undefined here then propably REQUIRED_ALIAS not equals to specified in the databases.conf!
2025-05-13 08:53:14.066 #
2025-05-13 08:53:14.066 assert fname_in_dbconf
2025-05-13 08:53:14.066
2025-05-13 08:53:14.066 test_sql = f"""
2025-05-13 08:53:14.066 set list on;
2025-05-13 08:53:14.066 create database '{REQUIRED_ALIAS}' user {act.db.user} password '{act.db.password}' page_size {PAGE_SIZE};
2025-05-13 08:53:14.066 commit;
2025-05-13 08:53:14.066 recreate sequence g;
2025-05-13 08:53:14.066 recreate table test(id int, b blob);
2025-05-13 08:53:14.066
2025-05-13 08:53:14.066 set autoterm on;
2025-05-13 08:53:14.066 execute block as
2025-05-13 08:53:14.066 declare n int;
2025-05-13 08:53:14.066 begin
2025-05-13 08:53:14.066 insert into test(id, b) values(gen_id(g,1), gen_uuid());
2025-05-13 08:53:14.066 insert into test(id, b)
2025-05-13 08:53:14.067 values(
2025-05-13 08:53:14.067 gen_id(g,1)
2025-05-13 08:53:14.067 ,(select list(gen_uuid()) as s from rdb$types,rdb$types)
2025-05-13 08:53:14.067 );
2025-05-13 08:53:14.067
2025-05-13 08:53:14.067 insert into test(id, b)
2025-05-13 08:53:14.067 values(
2025-05-13 08:53:14.067 gen_id(g,1)
2025-05-13 08:53:14.067 ,(select list(gen_uuid()) as s from (select 1 x from rdb$types,rdb$types,rdb$types rows 800000))
2025-05-13 08:53:14.067 );
2025-05-13 08:53:14.067 end
2025-05-13 08:53:14.067 ;
2025-05-13 08:53:14.067 commit;
2025-05-13 08:53:14.067 select mon$database_name, mon$page_buffers from mon$database;
2025-05-13 08:53:14.067 """
2025-05-13 08:53:14.067
2025-05-13 08:53:14.067 test_fdb_file = 'UNDEFINED'
2025-05-13 08:53:14.067 act.isql(switches=['-q'], input = test_sql, connect_db = False, credentials = False, combine_output = True, io_enc = locale.getpreferredencoding())
2025-05-13 08:53:14.067 for line in act.stdout.splitlines():
2025-05-13 08:53:14.067 if line.startswith('mon$database_name'.upper()):
2025-05-13 08:53:14.067 test_fdb_file = line.split()[1]
2025-05-13 08:53:14.067 if line.startswith('mon$page_buffers'.upper()):
2025-05-13 08:53:14.068 test_fdb_buffers = int(line.split()[1])
2025-05-13 08:53:14.068
2025-05-13 08:53:14.068 assert test_fdb_buffers == 128
2025-05-13 08:53:14.068 act.reset()
2025-05-13 08:53:14.068
2025-05-13 08:53:14.068 act.gbak(switches=['-b', act.db.dsn, str(tmp_fbk)], combine_output = True, io_enc = locale.getpreferredencoding())
2025-05-13 08:53:14.068 > assert act.clean_stdout == ''
2025-05-13 08:53:14.068 E assert
2025-05-13 08:53:14.068 E + gbak: ERROR:Unable to complete network request to host "localhost".
2025-05-13 08:53:14.068 E + gbak: ERROR: Failed to establish a connection.
2025-05-13 08:53:14.068 E + gbak:Exiting before completion due to errors
2025-05-13 08:53:14.068
2025-05-13 08:53:14.068 tests\bugs\gh_8391_test.py:116: AssertionError
|
3 #text |
act = <firebird.qa.plugin.Action pytest object at [hex]>
tmp_fbk = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11708/tmp_gh_8391.restored.fbk')
tmp_log = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11708/tmp_gh_8391.restored.log')
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>
@pytest.mark.version('>=4.0.6')
def test_1(act: Action, tmp_fbk: Path, tmp_log: Path, capsys):
if act.get_server_architecture() != 'SuperServer':
pytest.skip('Applies only to SuperServer')
# Scan line-by-line through databases.conf, find line starting with REQUIRED_ALIAS and extract name of file that
# must be created in the $(dir_sampleDb)/qa/ folder.
# NOTE: we have to SKIP lines which are commented out, i.e. if they starts with '#':
p_required_alias_ptn = re.compile( '^(?!#)((^|\\s+)' + REQUIRED_ALIAS + ')\\s*=\\s*\\$\\(dir_sampleDb\\)/qa/', re.IGNORECASE )
fname_in_dbconf = None
with open(act.home_dir/'databases.conf', 'r') as f:
for line in f:
if p_required_alias_ptn.search(line):
# If databases.conf contains line like this:
# tmp_8391_alias = $(dir_sampleDb)/qa/tmp_qa_8391.fdb
# - then we extract filename: 'tmp_qa_8391.fdb' (see below):
fname_in_dbconf = Path(line.split('=')[1].strip()).name
break
# if 'fname_in_dbconf' remains undefined here then propably REQUIRED_ALIAS not equals to specified in the databases.conf!
#
assert fname_in_dbconf
test_sql = f"""
set list on;
create database '{REQUIRED_ALIAS}' user {act.db.user} password '{act.db.password}' page_size {PAGE_SIZE};
commit;
recreate sequence g;
recreate table test(id int, b blob);
set autoterm on;
execute block as
declare n int;
begin
insert into test(id, b) values(gen_id(g,1), gen_uuid());
insert into test(id, b)
values(
gen_id(g,1)
,(select list(gen_uuid()) as s from rdb$types,rdb$types)
);
insert into test(id, b)
values(
gen_id(g,1)
,(select list(gen_uuid()) as s from (select 1 x from rdb$types,rdb$types,rdb$types rows 800000))
);
end
;
commit;
select mon$database_name, mon$page_buffers from mon$database;
"""
test_fdb_file = 'UNDEFINED'
act.isql(switches=['-q'], input = test_sql, connect_db = False, credentials = False, combine_output = True, io_enc = locale.getpreferredencoding())
for line in act.stdout.splitlines():
if line.startswith('mon$database_name'.upper()):
test_fdb_file = line.split()[1]
if line.startswith('mon$page_buffers'.upper()):
test_fdb_buffers = int(line.split()[1])
assert test_fdb_buffers == 128
act.reset()
act.gbak(switches=['-b', act.db.dsn, str(tmp_fbk)], combine_output = True, io_enc = locale.getpreferredencoding())
> assert act.clean_stdout == ''
E assert
E + gbak: ERROR:Unable to complete network request to host "localhost".
E + gbak: ERROR: Failed to establish a connection.
E + gbak:Exiting before completion due to errors
tests\bugs\gh_8391_test.py:116: AssertionError
|