From 52301e0a862c60f63bddc967e69043d756374077 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Wed, 10 Apr 2013 12:03:34 +0200 Subject: [PATCH] Fixing S3ClientMockTest hanging on Java 7 since 843ed57 --- apis/s3/src/test/java/org/jclouds/s3/S3ClientMockTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apis/s3/src/test/java/org/jclouds/s3/S3ClientMockTest.java b/apis/s3/src/test/java/org/jclouds/s3/S3ClientMockTest.java index 81ef01db17..a040eb0c4a 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/S3ClientMockTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/S3ClientMockTest.java @@ -71,13 +71,15 @@ public class S3ClientMockTest { public void testZeroLengthPutHasContentLengthHeader() throws IOException, InterruptedException { MockWebServer server = new MockWebServer(); server.enqueue(new MockResponse().setBody("").addHeader(ETAG, "ABCDEF")); + // hangs on Java 7 without this additional response ?!? + server.enqueue(new MockResponse()); server.play(); S3Client client = getS3Client(server.getUrl("/")); S3Object nada = client.newS3Object(); nada.getMetadata().setKey("object"); nada.setPayload(new byte[] {}); - + assertEquals(client.putObject("bucket", nada), "ABCDEF"); RecordedRequest request = server.takeRequest();