mirror of https://github.com/apache/jclouds.git
Work around CloudFiles test failures
Java helpfully interprets Expect: 100-continue instead of returning
the response code. This commit reverts
100afba1d8
.
This commit is contained in:
parent
578a77d631
commit
e30f865215
|
@ -16,10 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.cloudfiles.blobstore.integration;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.openstack.swift.blobstore.integration.SwiftBlobSignerLiveTest;
|
||||
import org.testng.SkipException;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
|
@ -30,16 +27,4 @@ public class CloudFilesBlobSignerLiveTest extends SwiftBlobSignerLiveTest {
|
|||
public CloudFilesBlobSignerLiveTest() {
|
||||
provider = "cloudfiles";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testSignGetUrlWithTime() throws InterruptedException, IOException {
|
||||
throw new SkipException("not yet implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testSignPutUrlWithTime() throws InterruptedException, IOException {
|
||||
throw new SkipException("not yet implemented");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.blobstore.integration.internal;
|
||||
|
||||
import static com.google.common.net.HttpHeaders.EXPECT;
|
||||
import static org.jclouds.blobstore.options.GetOptions.Builder.range;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.fail;
|
||||
|
@ -130,6 +131,10 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest {
|
|||
String container = getContainerName();
|
||||
try {
|
||||
HttpRequest request = view.getSigner().signPutBlob(container, blob, 3 /* seconds */);
|
||||
// Strip Expect: 100-continue since Java 7+ will throw a
|
||||
// ProtocolException instead of setting the response code:
|
||||
// http://www.docjar.com/html/api/sun/net/www/protocol/http/HttpURLConnection.java.html#1021
|
||||
request = request.toBuilder().removeHeader(EXPECT).build();
|
||||
assertEquals(request.getFilters().size(), 0);
|
||||
|
||||
Strings2.toString(view.utils().http().invoke(request).getPayload());
|
||||
|
|
|
@ -16,10 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.cloudfiles.blobstore.integration.CloudFilesBlobSignerLiveTest;
|
||||
import org.testng.SkipException;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
|
@ -31,16 +28,4 @@ public class CloudFilesUKBlobSignerLiveTest extends CloudFilesBlobSignerLiveTest
|
|||
public CloudFilesUKBlobSignerLiveTest() {
|
||||
provider = "cloudfiles-uk";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testSignGetUrlWithTime() throws InterruptedException, IOException {
|
||||
throw new SkipException("not yet implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testSignPutUrlWithTime() throws InterruptedException, IOException {
|
||||
throw new SkipException("not yet implemented");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudfiles.blobstore.integration;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jclouds.cloudfiles.blobstore.integration.CloudFilesBlobSignerLiveTest;
|
||||
import org.testng.SkipException;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
|
@ -31,16 +28,4 @@ public class CloudFilesUSBlobSignerLiveTest extends CloudFilesBlobSignerLiveTest
|
|||
public CloudFilesUSBlobSignerLiveTest() {
|
||||
provider = "cloudfiles-us";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testSignGetUrlWithTime() throws InterruptedException, IOException {
|
||||
throw new SkipException("not yet implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testSignPutUrlWithTime() throws InterruptedException, IOException {
|
||||
throw new SkipException("not yet implemented");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue