You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Zack Shoylev <no...@github.com> on 2014/05/15 01:27:55 UTC

[jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

This is more likely to happen in swift calls.
This depends on https://github.com/jclouds/jclouds/pull/368 and https://github.com/jclouds/jclouds/pull/369
You can merge this Pull Request by running:

  git pull https://github.com/rackerlabs/jclouds-labs-openstack add-408-swift-test

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

  https://github.com/jclouds/jclouds-labs-openstack/pull/100

-- Commit Summary --

  * Adds a mock test to ensure 408 errors are handler properly in swift, specifically.

-- File Changes --

    M openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiMockTest.java (38)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-openstack/pull/100.patch
https://github.com/jclouds/jclouds-labs-openstack/pull/100.diff

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

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Closed #100.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#event-121932779

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43262312

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
About to merge

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43239587

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Andrew Phillips <no...@github.com>.
> +      server.enqueue(addCommonHeaders(new MockResponse()
> +            .setResponseCode(201)
> +            .addHeader("ETag", "d9f5eb4bba4e2f2f046e54611bc8196b")));
> +
> +      try {
> +         Properties overrides = new Properties();
> +         overrides.setProperty(PROPERTY_MAX_RETRIES, 5 + "");
> +
> +         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift", overrides);
> +         assertEquals(
> +               api.objectApiInRegionForContainer("DFW", "myContainer").replace("myObject",
> +                     new ByteSourcePayload(ByteSource.wrap("swifty".getBytes())), metadata), "d9f5eb4bba4e2f2f046e54611bc8196b");
> +
> +         assertEquals(server.getRequestCount(), 5);
> +         assertAuthentication(server);
> +         RecordedRequest replace = server.takeRequest();

Thanks for clarifying, @jdaggett!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100/files#r12778700

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1149](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1149/) 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-labs-openstack/pull/100#issuecomment-43243334

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Jeremy Daggett <no...@github.com>.
> +      server.enqueue(addCommonHeaders(new MockResponse()
> +            .setResponseCode(201)
> +            .addHeader("ETag", "d9f5eb4bba4e2f2f046e54611bc8196b")));
> +
> +      try {
> +         Properties overrides = new Properties();
> +         overrides.setProperty(PROPERTY_MAX_RETRIES, 5 + "");
> +
> +         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift", overrides);
> +         assertEquals(
> +               api.objectApiInRegionForContainer("DFW", "myContainer").replace("myObject",
> +                     new ByteSourcePayload(ByteSource.wrap("swifty".getBytes())), metadata), "d9f5eb4bba4e2f2f046e54611bc8196b");
> +
> +         assertEquals(server.getRequestCount(), 5);
> +         assertAuthentication(server);
> +         RecordedRequest replace = server.takeRequest();

@demobox It wasn't the best name for this method and was left over from the early implementation. The API changes for 1.8 refer to it as `put`. HTH!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100/files#r12754053

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1147](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1147/) 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-labs-openstack/pull/100#issuecomment-43239092

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Reopened #100.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#event-121932792

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Not really. I am still tracking it down, @demobox 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43343081

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
A few more tests but will merge if cannot reproduce. Maybe something with the build cluster.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43357537

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Can't reproduce it. Ideas?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43346181

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43344930

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Closed #100.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#event-121577237

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Jeremy Daggett <no...@github.com>.
@zack-shoylev LGTM! +1

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43341705

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Reopened #100.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#event-121577246

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #244](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/244/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43241701

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Deprecation problems fixed as suggested. Making sure everything works, then going to rebase/merge.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43266811

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43238334

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Andrew Phillips <no...@github.com>.
> +      server.enqueue(addCommonHeaders(new MockResponse()
> +            .setResponseCode(201)
> +            .addHeader("ETag", "d9f5eb4bba4e2f2f046e54611bc8196b")));
> +
> +      try {
> +         Properties overrides = new Properties();
> +         overrides.setProperty(PROPERTY_MAX_RETRIES, 5 + "");
> +
> +         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift", overrides);
> +         assertEquals(
> +               api.objectApiInRegionForContainer("DFW", "myContainer").replace("myObject",
> +                     new ByteSourcePayload(ByteSource.wrap("swifty".getBytes())), metadata), "d9f5eb4bba4e2f2f046e54611bc8196b");
> +
> +         assertEquals(server.getRequestCount(), 5);
> +         assertAuthentication(server);
> +         RecordedRequest replace = server.takeRequest();

Just curious...why is this called `replace`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100/files#r12753901

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #251](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/251/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43267744

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Andrew Phillips <no...@github.com>.
> jclouds-labs-openstack-pull-requests #252 UNSTABLE

`testReplace408Retry` is still [failing here](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/org.apache.jclouds.labs$openstack-swift/252/testReport/org.jclouds.openstack.swift.v1.features/ObjectApiMockTest/testReplace408Retry/). Is that expected?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43342467

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1148](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1148/) 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-labs-openstack/pull/100#issuecomment-43241031

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1133](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1133/) UNSTABLE
Looks like there's a problem with this pull request
[(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-labs-openstack/pull/100#issuecomment-43151642

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Rebased

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43272095

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
merged

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43361817

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #250](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/250/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43264527

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Reopened #100.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#event-121556645

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Needs amend

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43239834

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1154](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1154/) FAILURE
Looks like there's a problem with this pull request
[(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-labs-openstack/pull/100#issuecomment-43264437

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1153](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1153/) 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-labs-openstack/pull/100#issuecomment-43262158

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1157](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1157/) 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-labs-openstack/pull/100#issuecomment-43272776

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Zack Shoylev <no...@github.com>.
Closed #100.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#event-121999409

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1155](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1155/) 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-labs-openstack/pull/100#issuecomment-43267778

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #1158](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1158/) 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-labs-openstack/pull/100#issuecomment-43345045

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #237](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/237/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43151746

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #252](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/252/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43273019

Re: [jclouds-labs-openstack] Adds a mock test to ensure 408 errors are handler properly in swift (#100)

Posted by Andrew Phillips <no...@github.com>.
> A few more tests but will merge if cannot reproduce. Maybe something with the build cluster.

Thanks for trying, @zack-shoylev. Tests look fine, indeed. Some [Checkstyle stuff in Swift](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/253/org.apache.jclouds.labs$openstack-swift/violations/), but unrelated to this PR.

+1, looks good to me.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/100#issuecomment-43366560