Index: openacs-4/etc/install/dotlrn-basic-setup.test =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/dotlrn-basic-setup.test,v diff -u -r1.4 -r1.5 --- openacs-4/etc/install/dotlrn-basic-setup.test 12 Oct 2003 01:11:48 -0000 1.4 +++ openacs-4/etc/install/dotlrn-basic-setup.test 15 Oct 2003 10:08:43 -0000 1.5 @@ -3,46 +3,46 @@ # Test Execution START - ::twt::log "Login the site wide admin" + ::twt::log_section "Login the site wide admin" ::twt::user::login_site_wide_admin - ::twt::log "Add the site wide admin to dotLRN" + ::twt::log_section "Add the site wide admin to dotLRN" ::twt::dotlrn::add_site_wide_admin $server_url - ::twt::log "Upload users" + ::twt::log_section "Upload users" ::twt::user::upload_users $server_url - ::twt::log "Set up terms" + ::twt::log_section "Set up terms" ::twt::dotlrn::setup_terms $server_url - ::twt::log "Set up departments" + ::twt::log_section "Set up departments" ::twt::dotlrn::setup_departments $server_url - ::twt::log "Set up subjects" + ::twt::log_section "Set up subjects" ::twt::dotlrn::setup_subjects $server_url - ::twt::log "Set up classes" + ::twt::log_section "Set up classes" ::twt::dotlrn::setup_classes $server_url - ::twt::log "Set up communities (i.e. Tennis Club etc.)" + ::twt::log_section "Set up communities (i.e. Tennis Club etc.)" ::twt::dotlrn::setup_communities $server_url - ::twt::log "Add class members, i.e. professors, students and assistants" + ::twt::log_section "Add class members, i.e. professors, students and assistants" ::twt::class::setup_memberships $server_url - ::twt::log "Add class subgroups" + ::twt::log_section "Add class subgroups" ::twt::class::setup_subgroups $server_url - ::twt::log "Add class member applet" + ::twt::log_section "Add class member applet" ::twt::class::add_member_applets $server_url - ::twt::log "Set up class forums - one per class" + ::twt::log_section "Set up class forums - one per class" ::twt::forums::add_default_forums $server_url - ::twt::log "Add forum postings" + ::twt::log_section "Add forum postings" ::twt::forums::add_postings - ::twt::log "Add news items - one per class" + ::twt::log_section "Add news items - one per class" ::twt::news::add_item_to_classes $server_url # Test Execution END Index: openacs-4/etc/install/tcl-api-test.test =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/tcl-api-test.test,v diff -u -r1.3 -r1.4 --- openacs-4/etc/install/tcl-api-test.test 14 Oct 2003 16:23:29 -0000 1.3 +++ openacs-4/etc/install/tcl-api-test.test 15 Oct 2003 10:08:43 -0000 1.4 @@ -4,7 +4,7 @@ # Test Execution START - ::twt::log "Login the site wide admin" + ::twt::log_section "Login the site wide admin" ::twt::user::login_site_wide_admin # Run all tests Index: openacs-4/etc/install/tcl/twt-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/tcl/twt-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/etc/install/tcl/twt-procs.tcl 12 Oct 2003 08:31:28 -0000 1.2 +++ openacs-4/etc/install/tcl/twt-procs.tcl 15 Oct 2003 10:08:21 -0000 1.3 @@ -6,7 +6,7 @@ namespace eval ::twt {} -ad_proc ::twt::log { message } { +ad_proc ::twt::log_section { message } { set script_name [file tail [info script]] puts "" puts "##############################" @@ -17,10 +17,44 @@ puts "" } +ad_proc ::twt::log { message } { + set script_name [file tail [info script]] + puts "${script_name}: $message" +} + ad_proc ::twt::do_request { page_url } { - Takes a a url and invokes tclwebtest::do_request. + Takes a a url and invokes tclwebtest::do_request. Will retry + the request a number of times if it fails because of a socket + connect problem. } { - ::tclwebtest::do_request $page_url + set retry_count 0 + set retry_max 10 + set error_p 0 + while { [catch {::tclwebtest::do_request $page_url} errmsg] } { + set error_p 1 + global errorInfo + + if { [regexp {host is unreachable} $errmsg] } { + # Socket problem - retry $retry_max times + if { $retry_count < $retry_max } { + ::twt::log "Failed to connect to server with error \"$errmsg\" - retrying" + incr retry_count + exec "sleep" "5" + continue + } else { + ::twt::log "Failed to connect to server with error \"$errmsg\" - giving up" + break + } + } else { + break + } + } + + if { $error_p } { + # Either some non-socket error, or a socket problem occuring with more than + # $retry_max times. Propagate the error while retaining the stack trace + error "::tclwebtest::do_request threw error $errmsg with errorInfo $errorInfo" + } } ad_proc ::twt::get_url_list { page_url link_url_pattern } {