aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-02-27 11:33:16 +0200
committerVaadin Code Review <review@vaadin.com>2014-03-03 12:51:45 +0000
commit6249518e8b84ce9d8809374a652610600f13f0a6 (patch)
tree2e4f59ceef2fa3602ecf3d3d855a91f11c3c67e7 /uitest/src
parent5dffe132bc98853832431424da5755d8d8d820e4 (diff)
downloadvaadin-framework-6249518e8b84ce9d8809374a652610600f13f0a6.tar.gz
vaadin-framework-6249518e8b84ce9d8809374a652610600f13f0a6.zip
Re-try opening ssh tunnel if it fails the first time(s)
Change-Id: I653db3a818435c023f0bbd8015d2bd1a35ed4e34
Diffstat (limited to 'uitest/src')
-rwxr-xr-xuitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
index 0bb76889a0..1a1e507a4a 100755
--- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
+++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTestWithProxy.java
@@ -72,8 +72,23 @@ public abstract class MultiBrowserTestWithProxy extends MultiBrowserTest {
if (proxySession != null) {
return;
}
-
- createProxy(getProxyPort());
+ for (int i = 0; i < 10; i++) {
+ // Potential workaround for problem with establishing many ssh
+ // connections at the same time
+ try {
+ createProxy(getProxyPort());
+ break;
+ } catch (JSchException e) {
+ try {
+ sleep(500);
+ } catch (InterruptedException e1) {
+ }
+ if (i == 9) {
+ throw new RuntimeException(
+ "All 10 attempts to connect a proxy failed", e);
+ }
+ }
+ }
}
private void createProxy(int proxyPort) throws JSchException {