Skip to content

Commit

Permalink
Merge pull request #326 from veena-udayabhanu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
joeg committed Nov 27, 2013
2 parents a5d13f5 + 147737d commit 3cc8c76
Show file tree
Hide file tree
Showing 20 changed files with 72 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ static HeaderConstants()
/// <summary>
/// Specifies the value to use for UserAgent header.
/// </summary>
public const string UserAgentProductVersion = "2.1.0.3";
public const string UserAgentProductVersion = "2.1.0.4";

/// <summary>
/// Master Windows Azure Storage header prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
return m;
}

if (!IsInputReference(e))
if (!IsInputReference(e) && e.NodeType != ExpressionType.Convert && e.NodeType != ExpressionType.ConvertChecked)
{
this.builder.Append(UriHelper.FORWARDSLASH);
}
Expand Down Expand Up @@ -266,30 +266,6 @@ internal override Expression VisitUnary(UnaryExpression u)
break;
case ExpressionType.Convert:
case ExpressionType.ConvertChecked:
if (u.Type != typeof(object))
{
this.builder.Append(UriHelper.CAST);
this.builder.Append(UriHelper.LEFTPAREN);
if (!IsInputReference(u.Operand))
{
this.Visit(u.Operand);
this.builder.Append(UriHelper.COMMA);
}

this.builder.Append(UriHelper.QUOTE);
this.builder.Append(this.TypeNameForUri(u.Type));
this.builder.Append(UriHelper.QUOTE);
this.builder.Append(UriHelper.RIGHTPAREN);
}
else
{
if (!IsInputReference(u.Operand))
{
this.Visit(u.Operand);
}
}

break;
case ExpressionType.UnaryPlus:
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]

#if SIGN
[assembly: InternalsVisibleTo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>WindowsAzure.Storage</id>
<version>2.1.0.3</version>
<version>2.1.0.4</version>
<title>Windows Azure Storage</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]
[assembly: ComVisible(false)]

#if SIGN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]
[assembly: ComVisible(false)]

#if SIGN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>WindowsAzure.Storage.Table-Preview</id>
<version>2.1.0.3-preview</version>
<version>2.1.0.4-preview</version>
<title>Windows Azure Storage Tables Extension for Windows Runtime</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand All @@ -15,7 +15,7 @@ Windows Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/
<summary>A table extension library for Windows Runtime for working with Windows Azure Storage tables.</summary>
<tags>Microsoft, Azure, Storage, Table, Scalable, winrt, windowsazureofficial</tags>
<dependencies>
<dependency id="WindowsAzure.Storage-Preview" version="2.1.0.3-preview" />
<dependency id="WindowsAzure.Storage-Preview" version="2.1.0.4-preview" />
</dependencies>
<frameworkAssemblies>
<frameworkAssembly assemblyName="System.Xml" targetFramework="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]

#if SIGN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>WindowsAzure.Storage-Preview</id>
<version>2.1.0.3-preview</version>
<version>2.1.0.4-preview</version>
<title>Windows Azure Storage</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,7 @@ public void TableBatchEntityOver1MBShouldThrow()

catch (StorageException)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than allowed by the Table Service.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than the maximum allowed size (1MB).");
}
}

Expand Down Expand Up @@ -2408,7 +2408,7 @@ public void TableBatchOver4MBShouldThrow()

catch (StorageException)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "ContentLengthExceeded" }, "The content length for the requested operation has exceeded the limit.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "ContentLengthExceeded" }, "The content length for the requested operation has exceeded the limit (4MB).");
}
}

Expand Down Expand Up @@ -2577,7 +2577,7 @@ public void TableBatchWithPropertyOver255CharsShouldThrow()

catch (StorageException)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "PropertyNameTooLong" }, "The property name exceeds the maximum allowed length.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "PropertyNameTooLong" }, "The property name exceeds the maximum allowed length (255).");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2203,7 +2203,7 @@ public void TableOperationInsertOver1MBSync()
}
catch (StorageException)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than allowed by the Table Service.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than the maximum allowed size (1MB).");
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,42 @@ public void MyTestCleanup()
#region Query Segmented

#region Sync
[TestMethod]
[Description("IQueryable - A test to validate basic table query")]
[TestCategory(ComponentCategory.Table)]
[TestCategory(TestTypeCategory.UnitTest)]
[TestCategory(SmokeTestCategory.NonSmoke)]
[TestCategory(TenantTypeCategory.DevStore), TestCategory(TenantTypeCategory.DevFabric), TestCategory(TenantTypeCategory.Cloud)]
public void TableQueryableExecuteQueryGeneric()
{
CloudTableClient tableClient = GenerateCloudTableClient();
CloudTable table = tableClient.GetTableReference(GenerateRandomTableName());
table.CreateIfNotExists();

BaseEntity entity = new BaseEntity("mypk", "myrk");
TableOperation operation = TableOperation.Insert(entity);
table.Execute(operation);

IQueryable<BaseEntity> query = table.CreateQuery<BaseEntity>().Where(x => x.PartitionKey == "mypk");
foreach (BaseEntity ent in query.ToList())
{
Assert.AreEqual("mypk", ent.PartitionKey);
}

IEnumerable<BaseEntity> entities1 = GetEntities<BaseEntity>(table, "mypk");
foreach (BaseEntity ent in entities1)
{
Assert.AreEqual("mypk", ent.PartitionKey);
}

}

private IEnumerable<T> GetEntities<T>(CloudTable table, string id) where T : ITableEntity, new()
{
IQueryable<T> query = table.CreateQuery<T>()
.Where(x => x.PartitionKey == "mypk");
return query.ToList();
}

[TestMethod]
[Description("IQueryable - A test to validate basic table query")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ public async Task TableBatchEntityOver1MBShouldThrow()
}
catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than allowed by the Table Service.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than the maximum allowed size (1MB).");
}
}

Expand Down Expand Up @@ -1174,7 +1174,7 @@ public async Task TableBatchOver4MBShouldThrow()

catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "ContentLengthExceeded" }, "The content length for the requested operation has exceeded the limit.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "ContentLengthExceeded" }, "The content length for the requested operation has exceeded the limit (4MB).");
}
}

Expand Down Expand Up @@ -1340,7 +1340,7 @@ public async Task TableBatchWithPropertyOver255CharsShouldThrow()

catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "PropertyNameTooLong" }, "The property name exceeds the maximum allowed length.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "PropertyNameTooLong" }, "The property name exceeds the maximum allowed length (255).");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ public async Task TableOperationInsertOver1MBAsync()
}
catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than allowed by the Table Service.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than the maximum allowed size (1MB).");
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.1.0.3")]
[assembly: AssemblyFileVersion("2.1.0.3")]
[assembly: AssemblyVersion("2.1.0.4")]
[assembly: AssemblyFileVersion("2.1.0.4")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ public async Task TableBatchEntityOver1MBShouldThrowAsync()
}
catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than allowed by the Table Service.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than the maximum allowed size (1MB).");
}
}

Expand Down Expand Up @@ -1164,7 +1164,7 @@ public async Task TableBatchOver4MBShouldThrowAsync()

catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "ContentLengthExceeded" }, "The content length for the requested operation has exceeded the limit.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "ContentLengthExceeded" }, "The content length for the requested operation has exceeded the limit (4MB).");
}
}

Expand Down Expand Up @@ -1331,7 +1331,7 @@ public async Task TableBatchWithPropertyOver255CharsShouldThrow()

catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "PropertyNameTooLong" }, "The property name exceeds the maximum allowed length.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "PropertyNameTooLong" }, "The property name exceeds the maximum allowed length (255).");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ public async Task TableOperationInsertOver1MBAsync()
}
catch (Exception)
{
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than allowed by the Table Service.");
TestHelper.ValidateResponse(opContext, 1, (int)HttpStatusCode.BadRequest, new string[] { "EntityTooLarge" }, "The entity is larger than the maximum allowed size (1MB).");
}
}
#endregion
Expand Down
4 changes: 4 additions & 0 deletions microsoft-azure-api/Services/Storage/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,7 @@ Issues fixed in 2.1.0.2 :
Issues fixed in 2.1.0.3 :

- All: Registered wait handles are unregistered sooner for more efficient GC.

Issues fixed in 2.1.0.4 :

- Tables: Do not send the cast operator in the table query filter string.

0 comments on commit 3cc8c76

Please sign in to comment.