Enable range tests for azureblob

This commit is contained in:
Andrew Gaul 2016-01-23 12:38:50 -08:00
parent 3a65df1e2e
commit b2c0786fc0
3 changed files with 3 additions and 16 deletions

View File

@ -413,7 +413,7 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest {
Blob blob3 = view.getBlobStore().getBlob(container, name, new GetOptions().tail(TEST_STRING.length() + 10));
validateMetadata(blob3.getMetadata(), container, name);
assertEquals(getContentAsStringOrNullAndClose(blob3), TEST_STRING);
assertThat(blob3.getAllHeaders().get(HttpHeaders.CONTENT_RANGE)).containsExactly("bytes 0-45/46");
// not all providers return Content-Range for non-partial responses
} finally {
returnContainer(container);
}

View File

@ -331,15 +331,8 @@ public class AzureBlobClientLiveTest extends BaseBlobStoreIntegrationTest {
assertEquals(e.getResponse().getStatusCode(), 412);
}
// Range
// doesn't work per
// http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/479fa63f-51df-4b66-96b5-33ae362747b6
// getBlob = getApi()
// .getBlob(privateContainer, object.getProperties().getName(),
// GetOptions.Builder.startAt(8)).get(120,
// TimeUnit.SECONDS);
// assertEquals(Utils.toStringAndClose((InputStream) getBlob.getData()),
// data.substring(8));
getBlob = getApi().getBlob(privateContainer, object.getProperties().getName(), GetOptions.Builder.startAt(8));
assertEquals(Strings2.toStringAndClose(getBlob.getPayload().openStream()), data.substring(8));
getApi().deleteBlob(privateContainer, "object");
getApi().deleteBlob(privateContainer, "chunked-object");

View File

@ -64,10 +64,4 @@ public class AzureBlobIntegrationLiveTest extends BaseBlobIntegrationTest {
public void testPutBlobAccessMultipart() throws Exception {
super.testPutBlobAccessMultipart();
}
@Override
@Test
public void testGetRange() {
throw new SkipException("Currently broken on Azure");
}
}