Skip to content
This repository
Browse code

Merge pull request #617 from jcookems/dev

Dev
  • Loading branch information...
commit adc06f78795abd807cd89e2b1887b38c89068f70 2 parents f8f9051 + 5498cbf
Jason Cooke [Microsoft] authored January 14, 2013
8  ...oft-azure-api/src/test/java/com/microsoft/windowsazure/services/blob/client/CloudBlobContainerTests.java
@@ -748,21 +748,21 @@ public void testCurrentOperationByteCount() throws URISyntaxException, StorageEx
748 748
 
749 749
         OperationContext operationContext = new OperationContext();
750 750
         BlobRequestOptions options = new BlobRequestOptions();
751  
-        options.setTimeoutIntervalInMs(1000);
  751
+        options.setTimeoutIntervalInMs(2000);
752 752
         options.setRetryPolicyFactory(new RetryNoRetry());
  753
+        ByteArrayOutputStream downloadedDataStream = new ByteArrayOutputStream();
753 754
         try {
754  
-            final ByteArrayOutputStream downloadedDataStream = new ByteArrayOutputStream();
755 755
             blobRef.download(downloadedDataStream, null, options, operationContext);
756 756
         }
757 757
         catch (Exception e) {
758  
-            Assert.assertEquals(0, operationContext.getCurrentOperationByteCount());
  758
+            Assert.assertEquals(downloadedDataStream.size(), operationContext.getCurrentOperationByteCount());
759 759
         }
760 760
 
761 761
         operationContext = new OperationContext();
762 762
         options = new BlobRequestOptions();
763 763
         options.setTimeoutIntervalInMs(90000);
764 764
 
765  
-        final ByteArrayOutputStream downloadedDataStream = new ByteArrayOutputStream();
  765
+        downloadedDataStream = new ByteArrayOutputStream();
766 766
         blobRef.download(downloadedDataStream, null, options, operationContext);
767 767
 
768 768
         Assert.assertEquals(blockLength * numberOfBlocks, operationContext.getCurrentOperationByteCount());

0 notes on commit adc06f7

Please sign in to comment.
Something went wrong with that request. Please try again.