Skip to content

Commit 7c669e7

Browse files
committed
fixed dbwriter bigdecimal test
1 parent 9906700 commit 7c669e7

File tree

1 file changed

+9
-8
lines changed
  • src/checktree_arco/checktree/dbwriter/bigdecimal

1 file changed

+9
-8
lines changed

src/checktree_arco/checktree/dbwriter/bigdecimal/check.exp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#
2828
# All Rights Reserved.
2929
#
30-
# Portions of this software are Copyright (c) 2023-2024 HPC-Gridware GmbH
30+
# Portions of this software are Copyright (c) 2023-2025 HPC-Gridware GmbH
3131
#
3232
##########################################################################
3333
#___INFO__MARK_END__
@@ -87,10 +87,8 @@ proc bigdecimal_setup {} {
8787
add_user $CHECK_SECOND_FOREIGN_SYSTEM_USER
8888
}
8989

90-
if {[info exists bigdecimal_backup]} {
91-
unset bigdecimal_backup
92-
}
9390
# we want to modify the global config - make a backup
91+
unset -nocomplain bigdecimal_backup
9492
get_config bigdecimal_backup
9593

9694
# enable reporting
@@ -124,7 +122,7 @@ proc bigdecimal_setup {} {
124122
}
125123
set sqlutil_sp_id [ lindex $sqlutil_id 1 ]
126124

127-
if { [ sqlutil_connect $sqlutil_sp_id] != 0 } {
125+
if {[sqlutil_connect $sqlutil_sp_id] != 0} {
128126
ts_log_config "Can not connect to database"
129127
close_spawn_process $sqlutil_id
130128
set sqlutil_id ""
@@ -147,7 +145,7 @@ proc bigdecimal_cleanup {} {
147145
delete_all_ars
148146
}
149147

150-
if { $sqlutil_id != "" } {
148+
if {$sqlutil_id != ""} {
151149
close_spawn_process $sqlutil_id
152150
}
153151
set sqlutil_id ""
@@ -235,9 +233,12 @@ proc bigdecimal_test {} {
235233

236234
# add queue
237235
set chgar(slots) "10"
238-
add_queue $Queue_Name1 "@allhosts" chgar
236+
# we may only add a single queue instance, otherwise the following code (bigdecimal_duplicate_record)
237+
# would try to create multiple records with the same big id,
238+
# which is prevented by the sge_queue's table primary key
239+
add_queue $Queue_Name1 [lindex $ts_config(execd_nodes) 0] chgar
239240
# duplicate queue record with big id
240-
if { [bigdecimal_duplicate_record "sge_queue" "q_id"] != 0 } {
241+
if {[bigdecimal_duplicate_record "sge_queue" "q_id"] != 0} {
241242
return -1
242243
}
243244
array unset chgar

0 commit comments

Comments
 (0)