}
}
@Test(groups = { "integration", "live" })
public void testFileGetParallel() throws Exception {
final ByteSource supplier = createTestInput(32 * 1024);
final String expectedContentDisposition = "attachment; filename=constit.txt";
final String container = getContainerName();
try {
final String name = "constitution.txt";
uploadByteSource(container, name, expectedContentDisposition, supplier);
Map<Integer, ListenableFuture<?>> responses = Maps.newHashMap();
for (int i = 0; i < 10; i++) {
responses.put(i, Futures.transform(view.getAsyncBlobStore().getBlob(container, name),
new Function<Blob, Void>() {
@Override
public Void apply(Blob from) {
try {
validateMetadata(from.getMetadata(), container, name);
assertEquals(ByteStreams2.hashAndClose(from.getPayload().openStream(), md5()), supplier.hash(md5()));
checkContentDisposition(from, expectedContentDisposition);
} catch (IOException e) {
Throwables.propagate(e);
}
return null;