mirror of
https://github.com/fluencelabs/redis
synced 2025-07-30 16:01:57 +00:00
catch exceptions in the server proc, to be able to kill the entire chain of running servers
This commit is contained in:
@@ -8,15 +8,9 @@ proc test {name code okpattern} {
|
||||
puts -nonewline [format "#%03d %-68s " $::testnum $name]
|
||||
flush stdout
|
||||
if {[catch {set retval [uplevel 1 $code]} error]} {
|
||||
puts "ERROR\n\nLogged warnings:"
|
||||
foreach file [glob tests/tmp/server.[pid].*/stdout] {
|
||||
set warnings [warnings_from_file $file]
|
||||
if {[string length $warnings] > 0} {
|
||||
puts $warnings
|
||||
}
|
||||
}
|
||||
puts "Script died with $error"
|
||||
exit 1
|
||||
puts "EXCEPTION"
|
||||
puts "\nCaught error: $error"
|
||||
error "exception"
|
||||
}
|
||||
if {$okpattern eq $retval || [string match $okpattern $retval]} {
|
||||
puts "PASSED"
|
||||
|
Reference in New Issue
Block a user