You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Bayer <no...@github.com> on 2013/06/17 21:37:44 UTC

[jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

You can merge this Pull Request by running:

  git pull https://github.com/abayer/jclouds-1 jclouds-100

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/36

-- Commit Summary --

  * JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time.

-- File Changes --

    M apis/s3/src/main/java/org/jclouds/s3/config/S3RestClientModule.java (2)
    M apis/sqs/src/main/java/org/jclouds/sqs/config/SQSRestClientModule.java (2)
    M apis/sts/src/main/java/org/jclouds/aws/config/AWSHttpApiModule.java (9)
    M apis/sts/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java (9)
    A apis/sts/src/main/java/org/jclouds/aws/handlers/AWSServerErrorRetryHandler.java (78)
    A apis/sts/src/test/java/org/jclouds/aws/handlers/AWSServerErrorRetryHandlerTest.java (115)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/36.patch
https://github.com/jclouds/jclouds/pull/36.diff


Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #457](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/457/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36#issuecomment-19581282

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Gaul <no...@github.com>.
> + * @author Adrian Cole
> + */
> +@Test(groups = "unit", testName = "AWSServerErrorRetryHandlerTest")
> +public class AWSServerErrorRetryHandlerTest {
> +   @Test
> +   public void test500DoesNotRetry() {
> +
> +      AWSUtils utils = createMock(AWSUtils.class);
> +      HttpCommand command = createMock(HttpCommand.class);
> +
> +      replay(utils, command);
> +
> +      AWSServerErrorRetryHandler retry = new AWSServerErrorRetryHandler(utils,
> +            ImmutableSet.<String> of());
> +
> +      assert !retry.shouldRetryRequest(command, HttpResponse.builder().statusCode(INTERNAL_SERVER_ERROR.getStatusCode()).build());

Better to use testng assertFalse?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36/files#r4735304

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Bayer <no...@github.com>.
We should really get the BuildHive stuff switched to the pull request builder on dev@cloud - so much faster, actual support for parallel builds...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36#issuecomment-19581327

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Bayer <no...@github.com>.
> +import org.jclouds.aws.domain.AWSError;
> +import org.jclouds.aws.util.AWSUtils;
> +import org.jclouds.http.HttpCommand;
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.http.HttpResponse;
> +import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
> +import org.jclouds.io.Payloads;
> +import org.testng.annotations.DataProvider;
> +import org.testng.annotations.Test;
> +
> +import com.google.common.collect.ImmutableSet;
> +
> +/**
> + * Tests behavior of {@code AWSServerErrorRetryHandler}
> + * 
> + * @author Adrian Cole

Whoopsie. Fixed in next push.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36/files#r4735316

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Gaul <no...@github.com>.
> +import org.jclouds.aws.domain.AWSError;
> +import org.jclouds.aws.util.AWSUtils;
> +import org.jclouds.http.HttpCommand;
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.http.HttpResponse;
> +import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
> +import org.jclouds.io.Payloads;
> +import org.testng.annotations.DataProvider;
> +import org.testng.annotations.Test;
> +
> +import com.google.common.collect.ImmutableSet;
> +
> +/**
> + * Tests behavior of {@code AWSServerErrorRetryHandler}
> + * 
> + * @author Adrian Cole

Correct authorship?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36/files#r4735267

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Bayer <no...@github.com>.
Closed #36.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Gaul <no...@github.com>.
+1

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36#issuecomment-19575738

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by BuildHive <no...@github.com>.
[jclouds ยป jclouds #109](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/109/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36#issuecomment-19584153

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Bayer <no...@github.com>.
> + * @author Adrian Cole
> + */
> +@Test(groups = "unit", testName = "AWSServerErrorRetryHandlerTest")
> +public class AWSServerErrorRetryHandlerTest {
> +   @Test
> +   public void test500DoesNotRetry() {
> +
> +      AWSUtils utils = createMock(AWSUtils.class);
> +      HttpCommand command = createMock(HttpCommand.class);
> +
> +      replay(utils, command);
> +
> +      AWSServerErrorRetryHandler retry = new AWSServerErrorRetryHandler(utils,
> +            ImmutableSet.<String> of());
> +
> +      assert !retry.shouldRetryRequest(command, HttpResponse.builder().statusCode(INTERNAL_SERVER_ERROR.getStatusCode()).build());

C&P fun - switching.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36/files#r4735330

Re: [jclouds] JCLOUDS-100. Add AWSServerErrorRetryHandler, with an increased backoff time (#36)

Posted by Andrew Bayer <no...@github.com>.
Pushed to master - will push to 1.6.x once that branch is open again.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/36#issuecomment-19582574