Skip to content
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

Compare query strings based on set of components in ec2 integration tests #3859

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

ysaito1001
Copy link
Contributor

Motivation and Context

Avoids comparing raw strings in ec2 integration tests

Description

With a updated service model for ec2, we have run into the following test failures in its integration tests,

----- paginators_handle_unset_tokens stdout ----
body did not match. left=expected, right=actual
Diff < left / right > :
<Action=DescribeSpotPriceHistory&Version=2016-11-15&·[1;48;5;52;31mAvailabilityZone=eu-north-1a&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX
>Action=DescribeSpotPriceHistory&Version=2016-11-15&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX·[1;48;5;22;32m&AvailabilityZone=eu-north-1a
 
thread 'paginators_handle_unset_tokens' panicked at sdk/aws-smithy-runtime/src/client/http/test_util/replay.rs:98:43:

---- paginators_handle_empty_tokens stdout ----
body did not match. left=expected, right=actual
Diff < left / right > :
<Action=DescribeSpotPriceHistory&Version=2016-11-15&·[1;48;5;52;31mAvailabilityZone=eu-north-1a&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX
>Action=DescribeSpotPriceHistory&Version=2016-11-15&InstanceType.1=g5.48xlarge&ProductDescription.1=Linux%2FUNIX·[1;48;5;22;32m&AvailabilityZone=eu-north-1a

thread 'paginators_handle_empty_tokens' panicked at sdk/aws-smithy-runtime/src/client/http/test_util/replay.rs:98:43:

We don't know exactly how a generated ec2 SDK built up query strings in a different order from what it is today, but whatever the root cause is, the ultimate fix remains the same. Comparing raw query strings can be unreliable, so this PR will fix that by comparing sets of strings derived from query strings.

Testing

Ran the edited tests against the generated ec2 SDK in question and it passed (without this PR, it did fail).


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

github-actions bot commented Oct 3, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link
Contributor

@landonxjames landonxjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, not a blocker

@ysaito1001 ysaito1001 marked this pull request as ready for review October 3, 2024 20:09
@ysaito1001 ysaito1001 requested a review from a team as a code owner October 3, 2024 20:09
Copy link

github-actions bot commented Oct 3, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001 ysaito1001 added this pull request to the merge queue Oct 3, 2024
Merged via the queue into main with commit 2c0274c Oct 3, 2024
44 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/fix-verifying-by-raw-string-comparison branch October 3, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants