Permalink
Browse files

Merge pull request #29 from jcookems/fromPublic

From public
  • Loading branch information...
2 parents 3ee1e09 + a8a893a commit 5498cbfee825a52c35901ebbc52c5e1519065f76 @jcookems jcookems committed Jan 14, 2013
@@ -748,21 +748,21 @@ public void testCurrentOperationByteCount() throws URISyntaxException, StorageEx
OperationContext operationContext = new OperationContext();
BlobRequestOptions options = new BlobRequestOptions();
- options.setTimeoutIntervalInMs(1000);
+ options.setTimeoutIntervalInMs(2000);
options.setRetryPolicyFactory(new RetryNoRetry());
+ ByteArrayOutputStream downloadedDataStream = new ByteArrayOutputStream();
try {
- final ByteArrayOutputStream downloadedDataStream = new ByteArrayOutputStream();
blobRef.download(downloadedDataStream, null, options, operationContext);
}
catch (Exception e) {
- Assert.assertEquals(0, operationContext.getCurrentOperationByteCount());
+ Assert.assertEquals(downloadedDataStream.size(), operationContext.getCurrentOperationByteCount());
}
operationContext = new OperationContext();
options = new BlobRequestOptions();
options.setTimeoutIntervalInMs(90000);
- final ByteArrayOutputStream downloadedDataStream = new ByteArrayOutputStream();
+ downloadedDataStream = new ByteArrayOutputStream();
blobRef.download(downloadedDataStream, null, options, operationContext);
Assert.assertEquals(blockLength * numberOfBlocks, operationContext.getCurrentOperationByteCount());

0 comments on commit 5498cbf

Please sign in to comment.