_acs-tcl__ad_schedule_proc (private)
_acs-tcl__ad_schedule_proc
Defined in packages/acs-tcl/tcl/test/utilities-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ set cluster_p [server_cluster_enabled_p] try { set canonical_server_p [ad_canonical_server_p] } on error {errmsg} { aa_false "Cluster not enabled, retrieving the canonical server will fail" $cluster_p set canonical_server_p false } foreach all_servers_p {t f} { # # We schedule a trivial proc. # set schedule_id [ad_schedule_proc -thread t -once t -debug t -all_servers $all_servers_p 100 expr {1 + 1}] # # According to the instance configuration, our scheduling may # be rejected. # set schedule_p [expr {$canonical_server_p || !$cluster_p || $all_servers_p}] if {!$schedule_p} { aa_equals "Proc should not be scheduled" $schedule_id "" } else { set found_p false set proc "" foreach s [ns_info scheduled] { # # We may test the correctness of all of these fields, # but we will stick to the basics: the scheduled proc # is there and the command is the right one. # set id [lindex $s 0] set flags [lindex $s 1] set next [lindex $s 3] set lastqueue [lindex $s 4] set laststart [lindex $s 5] set lastend [lindex $s 6] set proc [lindex $s 7] set arg [lrange $s 8 end] if {$id == $schedule_id} { set found_p true aa_true "Command was scheduled as expected" [regexp {^ad_run_scheduled_proc.*expr \{\{1 \+ 1\}\}.*$} $arg] aa_log "Unscheduling the proc" ns_unschedule_proc $id } } aa_true "We found the scheduled proc" $found_p } } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "ad_schedule_proc (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle