You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2014/06/26 23:08:01 UTC

git commit: JCLOUDS-457: limit body size for specific test

Repository: jclouds-labs-aws
Updated Branches:
  refs/heads/master 23f391d32 -> bce335a21


JCLOUDS-457: limit body size for specific test

For each test, we were forcing the server to discard the content of
the request body on @BeforeMethod. We need to do this on tests with a
huge body, but it may interfere with other tests which actually use
the body data.  To fix this problem, we moved the body limit
restriction to the tests that require it.


Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/commit/bce335a2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/tree/bce335a2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/diff/bce335a2

Branch: refs/heads/master
Commit: bce335a2148652d38bb3dac2e976ddca9871096b
Parents: 23f391d
Author: Roman C. Coedo <ro...@gmail.com>
Authored: Thu Jun 26 22:40:56 2014 +0200
Committer: Andrew Gaul <ga...@apache.org>
Committed: Thu Jun 26 14:07:35 2014 -0700

----------------------------------------------------------------------
 .../src/test/java/org/jclouds/glacier/GlacierClientMockTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/blob/bce335a2/glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java
----------------------------------------------------------------------
diff --git a/glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java b/glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java
index d996bdf..1876320 100644
--- a/glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java
+++ b/glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java
@@ -119,7 +119,6 @@ public class GlacierClientMockTest {
    @BeforeMethod
    private void initServer() throws IOException {
       server = new MockWebServer();
-      server.setBodyLimit(0);
       server.play();
       client = getGlacierClient(server.getUrl("/"));
    }
@@ -256,6 +255,8 @@ public class GlacierClientMockTest {
    // TODO: Change size to 4096 when moving to JDK 7
    @Test
    public void testUploadPartMaxSize() throws InterruptedException {
+      // force the server to discard the request body
+      server.setBodyLimit(0);
       MockResponse mr = buildBaseResponse(204);
       mr.addHeader(GlacierHeaders.TREE_HASH, TREEHASH);
       server.enqueue(mr);