You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Zack Shoylev <no...@github.com> on 2013/08/12 23:31:44 UTC

[jclouds] Reduces parallelism to make test work better with slower connections (#112)

Adjusts test timing to work properly and reliably
You can merge this Pull Request by running:

  git pull https://github.com/rackspace/jclouds blob-integration-test-fixes-constants

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

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

-- Commit Summary --

  * Reduces parallelism to make test work better with slower connections

-- File Changes --

    M blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java (9)

-- Patch Links --

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


Re: [jclouds] Reduces parallelism to make test work better with slower connections (#112)

Posted by Andrew Phillips <no...@github.com>.
> @@ -138,7 +140,7 @@ public void testPutFileParallel() throws InterruptedException, IOException, Time
>        final String container = getContainerName();
>        try {
>           Map<Integer, ListenableFuture<?>> responses = Maps.newHashMap();
> -         for (int i = 0; i < 10; i++) {
> +         for (int i = 0; i < 3; i++) {

How often was this failing? Fine with making it more robust, but are we also weakening the test now in an effort just to keep it short?

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

Re: [jclouds] Reduces parallelism to make test work better with slower connections (#112)

Posted by Zack Shoylev <no...@github.com>.
> @@ -138,7 +140,7 @@ public void testPutFileParallel() throws InterruptedException, IOException, Time
>        final String container = getContainerName();
>        try {
>           Map<Integer, ListenableFuture<?>> responses = Maps.newHashMap();
> -         for (int i = 0; i < 10; i++) {
> +         for (int i = 0; i < 3; i++) {

I don't think so. The actual parallel feature is still being tested - it just also works better on worse connections. It does not fail often even before the fix.
A different fix might be possible where the code is also made more robust - such as more retries or automatic back-off.

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

Re: [jclouds] Reduces parallelism to make test work better with slower connections (#112)

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

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

Re: [jclouds] Reduces parallelism to make test work better with slower connections (#112)

Posted by Andrew Phillips <no...@github.com>.
> @@ -138,7 +140,7 @@ public void testPutFileParallel() throws InterruptedException, IOException, Time
>        final String container = getContainerName();
>        try {
>           Map<Integer, ListenableFuture<?>> responses = Maps.newHashMap();
> -         for (int i = 0; i < 10; i++) {
> +         for (int i = 0; i < 3; i++) {

What would you say to 5 iterations of 3sec +/- each? But also fine to keep the change as-is.

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