Finish the bouncing tests with timeout exception model
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 07 Apr 2013 19:28:00 +0200
branchmodel
changeset 9420e2ced48871d
parent 941 d1e482f73507
child 943 28aae214c202
Finish the bouncing tests with timeout exception
rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/Console.java
     1.1 --- a/rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/Console.java	Sun Apr 07 17:42:50 2013 +0200
     1.2 +++ b/rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/Console.java	Sun Apr 07 19:28:00 2013 +0200
     1.3 @@ -130,6 +130,7 @@
     1.4          private final String[] arr = { null };
     1.5          private final String url;
     1.6          private Case c;
     1.7 +        private int retries;
     1.8  
     1.9          private Request(String url) throws IOException {
    1.10              this.url = url;
    1.11 @@ -162,9 +163,9 @@
    1.12                      beginTest(c);
    1.13                      log("Got \"" + data + "\"");
    1.14                  } else {
    1.15 -                    log("Processing \"" + arr[0] + "\"");
    1.16 +                    log("Processing \"" + arr[0] + "\" for " + retries + " time");
    1.17                  }
    1.18 -                Object result = c.runTest();
    1.19 +                Object result = retries++ >= 10 ? "java.lang.InterruptedException:timeout" : c.runTest();
    1.20                  finishTest(c, result);
    1.21                  
    1.22                  String u = url + "?request=" + c.getRequestId() + "&result=" + result;