aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {