Commit 7403758f authored by Kevin Tew's avatar Kevin Tew

testsuite/testswap swapin timout fix attempt

parent 28a7bb26
Fix Executor dies
Fix Swapin timeout
OldTests
email
Massive Run
......
......@@ -34,14 +34,35 @@ sub args {
sub retry_on_TIMEOUT(&$) {
my ($sub, $message) = @_;
my $retry_count = 0;
RETRY:
{
my $result = eval { $sub->(); };
if ($@) {
if ($@ =~ /SSL_SOCKET_TIMEOUT/) {
warn "SSL_SOCKET_TIMEOUT after $TBConfig::XMLRPC_SERVER_TIMEOUT seconds in $message";
$retry_count++;
redo RETRY;
}
elsif ($retry_count > 0 and $@->isa('RPC::XML::struct') and $@->value->{'output'} =~ /\*\*\* swapexp: Experiment .* is not swapped out!/) {
return 1;
}
else { die $@; }
}
$result;
}
}
sub succeed_on_TIMEOUT(&$) {
my ($sub, $message) = @_;
RETRY:
{
my $result = eval { $sub->(); };
if ($@) {
if ($@ =~ /SSL_SOCKET_TIMEOUT/) {
warn "SSL_SOCKET_TIMEOUT after $TBConfig::XMLRPC_SERVER_TIMEOUT seconds in $message";
return 1;
}
else { die $@; }
}
$result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment