_acs-kernel__acs_kernel__server_startup_ok (private)
_acs-kernel__acs_kernel__server_startup_ok
Defined in packages/acs-kernel/tcl/test/acs-kernel-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 logfile [ns_config ns/parameters serverlog [acs_root_dir]/log/error.log] set logfile_exists_p [file exists $logfile] aa_true "Logfile exists" $logfile_exists_p if {!$logfile_exists_p} { return } # # Find the latest startup sequence in the logfile and see if # any error was reported before its conclusion. # set start_pattern "^.*: [ns_info name]/[ns_info patchlevel] .* starting.*$" set end_pattern "^.*: [ns_info name]/[ns_info patchlevel] .* running.*$" set error_pattern "^.*Error: .*$" set found_start_p false set found_end_p false set found_error_p false set rfd [open $logfile r] while {[gets $rfd line] >= 0} { if {[regexp $start_pattern $line]} { # We found the start of a sequence, forget all the # stuff we might have found earlier. set found_start_p true set found_end_p false set found_error_p false } elseif {[regexp $end_pattern $line]} { set found_end_p true } elseif {!$found_error_p && !$found_end_p && [regexp $error_pattern $line]} { # Errors found after startup do not count. set found_error_p true } } close $rfd aa_true "Start of startup sequence was found" $found_start_p aa_true "End of startup sequence was found" $found_end_p aa_false "No errors detected during startup sequence" $found_error_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" "acs_kernel__server_startup_ok (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle