Skip to content

Commit

Permalink
Merge pull request Azure#10 from emgerner-msft/master
Browse files Browse the repository at this point in the history
1.0.0 release
  • Loading branch information
emgerner-msft committed May 12, 2014
2 parents e40cf09 + 09a0df1 commit c81388d
Show file tree
Hide file tree
Showing 81 changed files with 1,363 additions and 1,046 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014.05.12 Version 1.0.0
* Updated service version to 2014-02-14
* Fixed null-reference when null listingDetails are passed to listBlobsSegmented(String, boolean, EnumSet<BlobListingDetails>, int, ResultContinuation, BlobRequestOptions, OperationContext) overload
* StorageUri may contain only a secondary endpoint

2014.05.06 Version 0.7.0
* Created a DefaultRequestOptions object for each service client
* Deprecated getter/setters for all request option properties on the service clients
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To get the binaries of this library as distributed by Microsoft, ready for use w
<dependency>
<groupId>com.microsoft.windowsazure.storage</groupId>
<artifactId>microsoft-windowsazure-storage-sdk</artifactId>
<version>0.7.0</version>
<version>1.0.0</version>
</dependency>
```

Expand Down
6 changes: 3 additions & 3 deletions microsoft-azure-storage-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
Expand All @@ -25,7 +25,7 @@
<dependency>
<groupId>com.microsoft.windowsazure.storage</groupId>
<artifactId>microsoft-windowsazure-storage-sdk</artifactId>
<version>0.7.0</version>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class ServicePropertiesTests {
public void testAnalyticsDisable() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testAnalyticsDisable(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -89,7 +89,7 @@ private void testAnalyticsDisable(ServiceClient client, ServiceProperties props)
public void testAnalyticsDefaultServiceVersion() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testAnalyticsDefaultServiceVersion(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -119,7 +119,7 @@ private void testAnalyticsDefaultServiceVersion(ServiceClient client, ServicePro

assertServicePropertiesAreEqual(props, callDownloadServiceProperties(client));

props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
callUploadServiceProps(client, props);

assertServicePropertiesAreEqual(props, callDownloadServiceProperties(client));
Expand Down Expand Up @@ -149,7 +149,7 @@ private void testAnalyticsDefaultServiceVersion(ServiceClient client, ServicePro
public void testAnalyticsLoggingOperations() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testAnalyticsLoggingOperations(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -189,7 +189,7 @@ private void testAnalyticsLoggingOperations(ServiceClient client, ServicePropert
public void testAnalyticsMetricsLevel() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testAnalyticsMetricsLevel(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -234,7 +234,7 @@ private void testAnalyticsMetricsLevel(ServiceClient client, ServiceProperties p
public void testAnalyticsMinuteMetricsLevel() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testAnalyticsMinuteMetricsLevel(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -279,7 +279,7 @@ private void testAnalyticsMinuteMetricsLevel(ServiceClient client, ServiceProper
public void testAnalyticsRetentionPolicies() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testAnalyticsRetentionPolicies(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -359,7 +359,7 @@ private void testAnalyticsRetentionPolicies(ServiceClient client, ServicePropert
public void testCloudValidCorsRules() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testCloudValidCorsRules(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -478,7 +478,7 @@ private void testCloudValidCorsRules(ServiceClient client, ServiceProperties pro
public void testCorsExpectedExceptions() throws StorageException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testCorsExpectedExceptions(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -537,7 +537,7 @@ private void testCorsExpectedExceptions(ServiceClient client, ServiceProperties
public void testCorsMaxOrigins() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testCorsMaxOrigins(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -584,7 +584,7 @@ private void testCorsMaxOrigins(ServiceClient client, ServiceProperties props) t
public void testCorsMaxHeaders() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testCorsMaxHeaders(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down Expand Up @@ -683,7 +683,7 @@ private void testCorsMaxHeaders(ServiceClient client, ServiceProperties props) t
public void testOptionalServiceProperties() throws StorageException, InterruptedException {
ServiceClient client = TestHelper.createCloudBlobClient();
ServiceProperties props = new ServiceProperties();
props.setDefaultServiceVersion("2013-08-15");
props.setDefaultServiceVersion(Constants.HeaderConstants.TARGET_STORAGE_VERSION);
testOptionalServiceProperties(client, props);

client = TestHelper.createCloudQueueClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ public void testStorageUriWithTwoUris() throws URISyntaxException {
URI secondaryClientUri = new URI("http://" + ACCOUNT_NAME + SECONDARY_SUFFIX + BLOB_SERVICE + ENDPOINT_SUFFIX);
URI dummyClientUri = new URI("http://" + ACCOUNT_NAME + "-dummy" + BLOB_SERVICE + ENDPOINT_SUFFIX);

// no uri
try {
new StorageUri(null, null);
fail(SR.STORAGE_URI_NOT_NULL);
}
catch (IllegalArgumentException ex) {
assertEquals(SR.STORAGE_URI_NOT_NULL, ex.getMessage());
}

// primary uri only
StorageUri singleUri = new StorageUri(primaryClientUri);
assertEquals(primaryClientUri, singleUri.getPrimaryUri());
assertNull(singleUri.getSecondaryUri());
Expand All @@ -64,6 +74,18 @@ public void testStorageUriWithTwoUris() throws URISyntaxException {
StorageUri singleUri3 = new StorageUri(secondaryClientUri);
assertFalse(singleUri.equals(singleUri3));

// secondary uri only
StorageUri singleSecondaryUri = new StorageUri(null, secondaryClientUri);
assertEquals(primaryClientUri, singleSecondaryUri.getSecondaryUri());
assertNull(singleUri.getPrimaryUri());

StorageUri singleSecondarUri2 = new StorageUri(null, secondaryClientUri);
assertEquals(singleSecondaryUri, singleSecondarUri2);

StorageUri singleSecondarUri3 = new StorageUri(null, primaryClientUri);
assertFalse(singleSecondaryUri.equals(singleSecondarUri3));

// primary and secondary uri
StorageUri multiUri = new StorageUri(primaryClientUri, secondaryClientUri);
assertEquals(primaryClientUri, multiUri.getPrimaryUri());
assertEquals(secondaryClientUri, multiUri.getSecondaryUri());
Expand All @@ -74,6 +96,7 @@ public void testStorageUriWithTwoUris() throws URISyntaxException {

try {
new StorageUri(primaryClientUri, primaryContainerUri);
fail(SR.STORAGE_URI_MUST_MATCH);
}
catch (IllegalArgumentException ex) {
assertEquals(SR.STORAGE_URI_MUST_MATCH, ex.getMessage());
Expand All @@ -90,7 +113,7 @@ public void testStorageUriWithTwoUris() throws URISyntaxException {
}

@Test
public void DevelopmentStorageWithTwoUris() throws URISyntaxException {
public void testDevelopmentStorageWithTwoUris() throws URISyntaxException {
CloudStorageAccount account = CloudStorageAccount.getDevelopmentStorageAccount();
URI primaryClientURI = account.getBlobStorageUri().getPrimaryUri();
URI primaryContainerURI = new URI(primaryClientURI.toString() + "/container");
Expand Down
Loading

0 comments on commit c81388d

Please sign in to comment.