Examples of continueOrPropagate()


Examples of feign.Retryer.Default.continueOrPropagate()

    RetryableException e = new RetryableException(null, null, null);
    Default retryer = new Retryer.Default();
    assertEquals(retryer.attempt, 1);
    assertEquals(retryer.sleptForMillis, 0);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 2);
    assertEquals(retryer.sleptForMillis, 150);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 3);
View Full Code Here

Examples of feign.Retryer.Default.continueOrPropagate()

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 2);
    assertEquals(retryer.sleptForMillis, 150);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 3);
    assertEquals(retryer.sleptForMillis, 375);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 4);
View Full Code Here

Examples of feign.Retryer.Default.continueOrPropagate()

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 3);
    assertEquals(retryer.sleptForMillis, 375);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 4);
    assertEquals(retryer.sleptForMillis, 712);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 5);
View Full Code Here

Examples of feign.Retryer.Default.continueOrPropagate()

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 4);
    assertEquals(retryer.sleptForMillis, 712);

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 5);
    assertEquals(retryer.sleptForMillis, 1218);

    retryer.continueOrPropagate(e);
    // fail
View Full Code Here

Examples of feign.Retryer.Default.continueOrPropagate()

    retryer.continueOrPropagate(e);
    assertEquals(retryer.attempt, 5);
    assertEquals(retryer.sleptForMillis, 1218);

    retryer.continueOrPropagate(e);
    // fail
  }

  @Test public void considersRetryAfterButNotMoreThanMaxPeriod() throws Exception {
    Default retryer = new Retryer.Default() {
View Full Code Here

Examples of feign.Retryer.Default.continueOrPropagate()

      protected long currentTimeMillis() {
        return 0;
      }
    };

    retryer.continueOrPropagate(new RetryableException(null, null, new Date(5000)));
    assertEquals(retryer.attempt, 2);
    assertEquals(retryer.sleptForMillis, 1000);
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.