-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix failing collection related tests for v4 dev #3312
Fix failing collection related tests for v4 dev #3312
Conversation
sdk/src/Core/Amazon.Runtime/Internal/Transform/SimpleTypeUnmarshaller.cs
Show resolved
Hide resolved
generator/ServiceClientGeneratorLib/Generators/Marshallers/RestXmlResponseUnmarshaller.tt
Show resolved
Hide resolved
@@ -183,6 +187,10 @@ namespace <#=this.Config.Namespace #>.Model.Internal.MarshallTransformations | |||
#> | |||
if (context.TestExpression("<#=DetermineXmlMarshallName(member)#>", targetDepth)) | |||
{ | |||
if (response.<#=member.PropertyName#> == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment above about initializing collections.
sdk/src/Core/Amazon.Runtime/Internal/Transform/SimpleTypeUnmarshaller.cs
Show resolved
Hide resolved
@@ -51,6 +53,14 @@ private static void Compare(object x, object y, Type type) | |||
if (x == null && y == null) | |||
return; | |||
|
|||
if (x != null && x.GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(ICollection<>)) && !AWSConfigs.InitializeCollections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comparer should handle both possible boolean values for the InitializeCollections
property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other if statements handle when InitializeCollections
is true, but I did simplify the if statement and the statement below.
6056d15
to
fb91763
Compare
Description
With the initializeCollections flag set to false by default, this caused some protocol tests to fail. This fixes a couple issues.
Comparer.CompareObjects
for more detail)manual fixes - 6c259a9
generated fixes - 3e68e73
Motivation and Context
Testing
Fixes Failed Tests:
Screenshots (if appropriate)
Types of changes
Checklist
License