Skip to content

Commit 63d37f7

Browse files
committed
Added/Updated C:\FBTESTING\qa\fbt-repo\tests\bugs\core_6412.fbt: removed unneeded delay for 4s related to CORE-6441 which already fixed. Fixed wrong calls of ISQL and GFIX when using runProgram macros: no need to any prefix or os.path.join call.
1 parent e7c64fd commit 63d37f7

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

tests/bugs/core_6412.fbt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
Statement failed, SQLSTATE = 08006
1212
Error occurred during login, please check server firebird.log for details
1313
Error occurred during login, please check server firebird.log for details
14+
This was because of: http://tracker.firebirdsql.org/browse/CORE-6441 (fixed).
15+
1416
Content of firebird.log will be added with following lines:
1517
Srp Server
1618
connection shutdown
@@ -32,6 +34,13 @@ import shutil
3234
import uuid
3335
from fdb import services
3436

37+
svc = services.connect(host='localhost', user = user_name, password = user_password)
38+
fb_home=svc.get_home_directory()
39+
svc.close()
40+
41+
dbconf = os.path.join(fb_home,'databases.conf')
42+
dbcbak = os.path.join(fb_home,'databases.bak')
43+
3544
try:
3645
del os.environ["ISC_USER"]
3746
except KeyError as e:
@@ -77,16 +86,11 @@ def cleanup( f_names_list ):
7786

7887
#--------------------------------------------
7988

80-
fb_home = services.connect(host='localhost', user= user_name, password= user_password).get_home_directory()
81-
db_conn.close()
82-
8389
fdb_test = os.path.join(context['temp_directory'],'tmp_6412.fdb')
8490

85-
#rnd_suff=uuid.uuid4().hex[:8]
86-
#fdb_test = os.path.join(context['temp_directory'],'tmp_6412_'+rnd_suff+'.fdb')
8791

8892
# NB: fb_home is full path to FB instance home (with trailing slash).
89-
shutil.copy2( fb_home+'databases.conf', fb_home+'databases.bak' )
93+
shutil.copy2( dbconf, dbcbak )
9094

9195
tmp_alias = 'self_security_6412'
9296

@@ -162,19 +166,19 @@ sql_init=\
162166

163167
''' % locals()
164168

165-
runProgram(fb_home + 'isql',[ '-q' ], sql_init)
166-
runProgram(fb_home + 'gfix',[ '-shut', 'full', '-force', '0', 'localhost:' + fdb_test, '-user', 'SYSDBA', '-pas', 'QweRty' ])
169+
runProgram( 'isql',[ '-q' ], sql_init)
170+
runProgram( 'gfix',[ '-shut', 'full', '-force', '0', 'localhost:' + fdb_test, '-user', 'SYSDBA', '-pas', 'QweRty' ])
167171

168-
shutil.copy2( fb_home+'databases.bak', fb_home+'databases.conf' )
172+
shutil.move( dbcbak, dbconf )
169173

170-
cleanup( (fdb_test, fb_home+'databases.bak',) )
174+
cleanup( (fdb_test,) )
171175

172-
# !!! WARNING !!! This delay is necessary for running this test multiple times (in loop) on SS and SC.
176+
# This delay is necessary for running this test multiple times (in loop) on SS and SC.
173177
# Otherwise we get runtime error "SQLSTATE = 08006 / Error occurred during login, please check server firebird.log"
174178
# and firebird.log will be filled with: "Srp Server / connection shutdown / Database is shutdown."
175179
# Delay must be not less than 4 seconds. Tested on 4.0.0.2249.
176180
#############
177-
time.sleep(4)
181+
# 03-mar-2021: can be deleted (related to CORE-6441) >>> time.sleep(4)
178182
#############
179183

180184

0 commit comments

Comments
 (0)