Skip to content

Commit

Permalink
Merge pull request Azure#220 from jofriedm-msft/master
Browse files Browse the repository at this point in the history
6.0.0 Release
  • Loading branch information
erezvani1529 authored Oct 6, 2017
2 parents d54bf94 + b617dd6 commit abfae32
Show file tree
Hide file tree
Showing 25 changed files with 1,637 additions and 911 deletions.
12 changes: 11 additions & 1 deletion BreakingChanges.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
Changes in 5.1.1
Changes in 6.0.0

FILE
* Many File service APIs can now throw a URISyntaxException.
* Changed listShares() ShareListingDetails parameter to be an enum set like what is done for listing blobs.

OTHER
* DefaultEndpointsProtocol will now be explicitly included in generated connection strings.
* Connection string parsing has been substantially re-written and expanded. Please refer to current documentation about connection string formats.

Changes in 5.1.1
OTHER
* Reverted the code from 5.1.0 because it contained a regression and an accidental change.

Expand Down
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2017.10.06 Version 6.0.0
* Added support for taking a snapshot of a share.
* IOExceptions wrapping StorageExceptions will now contain the StorageException message in the outer exception.
* Connection string support expanded to allow AccountName to be specified with SharedAccessSignature and DefaultEndpointsProtocol. In this case, SharedAccessSignature is used for credentials, while having both DefaultEndpointsProtocol and AccountName allows the library to infer a set of default endpoints. Additionally, we have added support for BlobSecondaryEndpoint, QueueSecondaryEndpoint, TableSecondaryEndpoint, and FileSecondaryEndpoint. Specifying a secondary endpoint requires the specification of the corresponding primary.
* All: The use of DefaultEndpointsProtocol in a connection string is now optional in the case where endpoints would be automatically generated; if missing, a value of https will be inferred. When the parsed account settings in such a case are used to generate a connection string, the value of DefaultEndpointsProtocol will be explicitly included.

2017.08.28 Version 5.5.0
* Fixed a bug when using a SAS token where the token was being omitted from calls to delete a directory in the file service.
* For Standard Storage Accounts only, added the ability to set the tier of individual block blobs. The tier can currently only be set through uploadTier()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To get the binaries of this library as distributed by Microsoft, ready for use w
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>5.5.0</version>
<version>6.0.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion microsoft-azure-storage-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>5.5.0</version>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>5.5.0</version>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@
import com.microsoft.azure.storage.TestRunners.DevFabricTests;
import com.microsoft.azure.storage.TestRunners.DevStoreTests;

import org.apache.http.protocol.HTTP;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.SocketException;
import java.net.URISyntaxException;
import java.util.ArrayList;

Expand Down Expand Up @@ -121,39 +117,46 @@ public void eventOccurred(ErrorReceivingResponseEvent eventArg) {
}
});

OperationContext.getGlobalErrorReceivingResponseEventHandler().addListener(new StorageEvent<ErrorReceivingResponseEvent>() {
StorageEvent<ErrorReceivingResponseEvent> globalResponseReceivedListener = new StorageEvent<ErrorReceivingResponseEvent>() {

@Override
public void eventOccurred(ErrorReceivingResponseEvent eventArg) {
fail("This event should not trigger");
}
});
};

assertEquals(0, callList.size());
assertEquals(0, globalCallList.size());
try {
OperationContext.getGlobalErrorReceivingResponseEventHandler().addListener(globalResponseReceivedListener);

CloudBlobClient blobClient = TestHelper.createCloudBlobClient();
CloudBlobContainer container = blobClient.getContainerReference("container1");
assertEquals(0, callList.size());
assertEquals(0, globalCallList.size());

// make sure both update
container.exists(null, null, eventContext);
assertEquals(1, callList.size());
assertEquals(1, globalCallList.size());
CloudBlobClient blobClient = TestHelper.createCloudBlobClient();
CloudBlobContainer container = blobClient.getContainerReference("container1");

// make sure only global updates
container.exists();
assertEquals(1, callList.size());
assertEquals(2, globalCallList.size());
// make sure both update
container.exists(null, null, eventContext);
assertEquals(1, callList.size());
assertEquals(1, globalCallList.size());

OperationContext
.setGlobalResponseReceivedEventHandler(new StorageEventMultiCaster<ResponseReceivedEvent, StorageEvent<ResponseReceivedEvent>>());
eventContext
.setResponseReceivedEventHandler(new StorageEventMultiCaster<ResponseReceivedEvent, StorageEvent<ResponseReceivedEvent>>());
// make sure only global updates
container.exists();
assertEquals(1, callList.size());
assertEquals(2, globalCallList.size());

// make sure neither update
container.exists(null, null, eventContext);
assertEquals(1, callList.size());
assertEquals(2, globalCallList.size());
OperationContext
.setGlobalResponseReceivedEventHandler(new StorageEventMultiCaster<ResponseReceivedEvent, StorageEvent<ResponseReceivedEvent>>());
eventContext
.setResponseReceivedEventHandler(new StorageEventMultiCaster<ResponseReceivedEvent, StorageEvent<ResponseReceivedEvent>>());

// make sure neither update
container.exists(null, null, eventContext);
assertEquals(1, callList.size());
assertEquals(2, globalCallList.size());
}
finally {
OperationContext.getGlobalErrorReceivingResponseEventHandler().removeListener(globalResponseReceivedListener);
}
}

@Test
Expand Down
Loading

0 comments on commit abfae32

Please sign in to comment.