testbot/TestAgent: Retry the Wait RPC if the connection gets broken.

Francois Gouget fgouget at codeweavers.com
Thu May 15 08:55:23 CDT 2014


This seems necessary to work around network flakiness.
---

Finding the root cause for these connection drops would be preferable 
but unfortunately it has eluded me so far. So plan B is to work around 
them. Hopefully it will fix the 'network read timed out' errors we 
sometimes get, mostly for full WineTest runs:

Failure running script in VM: network read timed out (wait2:ListSize:0/4)

 testbot/lib/WineTestBot/TestAgent.pm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index fb14b38..b22fb06 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -1232,8 +1232,12 @@ sub Wait($$$;$)
       # The process has quit
       last if (defined $Result);
 
-      # Retry only if the timeout occurred on the remote end
-      last if ($self->{err} !~ /timed out waiting/);
+      # The only 'error' we should be getting here is the TestAgent server
+      # telling us it timed out waiting for the process. However flaky network
+      # connections like to break while we're waiting for the reply. So retry
+      # if that happens and let the automatic reconnection detect real network
+      # issues.
+      last if ($self->{err} !~ /(?:timed out waiting|network read timed out)/);
     }
   }
   $self->SetTimeout($OldTimeout);
-- 
2.0.0.rc0




More information about the wine-patches mailing list