Skip to content

Conversation

@AllanZhengYP
Copy link
Contributor

Description

The current cucumber test imports every tested client before test execution. When only a subset of clients are built and only run cucumber test against these clients will cause the test failed. Because other client packages are imported without being built.

This PR changes the V3 packages to be imported lazily when test is executed. So if the client packages not in the test scope were not built, the test won't fail.

Testing

yarn test:integration:legacy:since:release
yarn run v1.22.10
$ ./tests/integ-legacy/index.js
Looking for changed clients that has the legacy integration test tag: @acm,@apigateway,@autoscaling,@cloudformation,@cloudfront,@cloudsearch,@cloudtrail,@cloudwatch,@cloudwatchevents,@cloudwatchlogs,@codecommit,@codedeploy,@codepipeline,@cognitoidentity,@cognitosync,@configservice,@datapipeline,@devicefarm,@directconnect,@directoryservice,@databasemigrationservice,@dynamodbstreams,@dynamodb,@tables,@ec2,@ecr,@ecs,@efs,@elasticache,@elasticbeanstalk,@elastictranscoder,@elasticloadbalancing,@elasticloadbalancingv2,@emr,@elasticsearchservice,@gamelift,@glacier,@iam,@inspector,@iot,@kinesis,@kms,@lambda,@opsworks,@pinpoint,@rds,@redshift,@route53domains,@route53,@s3,@buckets,@s3,@objects,@sagemaker,@ses,@sns,@sqs,@messages,@sqs,@queues,@ssm,@storagegateway,@sts,@swf,@waf,@workspaces,
lerna notice cli v3.22.1
lerna info Looking for changed packages since v3.40.1
lerna success found 305 packages ready to publish
Running cucumber test: 
node_modules/.bin/cucumber-js --fail-fast -t "@acm or @cloudformation or @cloudfront or @cloudsearch or @cloudtrail or @cloudwatch or @codecommit or @codedeploy or @codepipeline or @dynamodb or @ec2 or @ecr or @ecs or @efs or @elasticache or @emr or @gamelift or @glacier or @iam or @inspector or @iot or @kinesis or @kms or @lambda or @opsworks or @pinpoint or @rds or @redshift or @s3 or @sagemaker or @ses or @sns or @sqs or @ssm or @sts or @swf or @waf or @workspaces"
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

108 scenarios (108 passed)
401 steps (401 passed)
1m32.284s
Done in 100.36s.

Partial test:

yarn test:integration:legacy:since:release         
yarn run v1.22.10
$ ./tests/integ-legacy/index.js
Looking for changed clients that has the legacy integration test tag: @acm,@apigateway,@autoscaling,@cloudformation,@cloudfront,@cloudsearch,@cloudtrail,@cloudwatch,@cloudwatchevents,@cloudwatchlogs,@codecommit,@codedeploy,@codepipeline,@cognitoidentity,@cognitosync,@configservice,@datapipeline,@devicefarm,@directconnect,@directoryservice,@databasemigrationservice,@dynamodbstreams,@dynamodb,@tables,@ec2,@ecr,@ecs,@efs,@elasticache,@elasticbeanstalk,@elastictranscoder,@elasticloadbalancing,@elasticloadbalancingv2,@emr,@elasticsearchservice,@gamelift,@glacier,@iam,@inspector,@iot,@kinesis,@kms,@lambda,@opsworks,@pinpoint,@rds,@redshift,@route53domains,@route53,@s3,@buckets,@s3,@objects,@sagemaker,@ses,@sns,@sqs,@messages,@sqs,@queues,@ssm,@storagegateway,@sts,@swf,@waf,@workspaces,
lerna notice cli v3.22.1
lerna info Looking for changed packages since v3.41.0
lerna success found 3 packages ready to publish
Running cucumber test: 
node_modules/.bin/cucumber-js --fail-fast -t "@ec2"
...............

3 scenarios (3 passed)
9 steps (9 passed)
0m22.237s
Done in 29.14s.
### Additional context
Add any other context about the PR here.

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

@AllanZhengYP AllanZhengYP requested a review from a team as a code owner November 17, 2021 19:05
@AllanZhengYP AllanZhengYP requested a review from trivikr November 17, 2021 19:18
@codecov-commenter
Copy link

Codecov Report

Merging #3033 (54ed1ae) into main (179afb9) will not change coverage.
The diff coverage is n/a.

❗ Current head 54ed1ae differs from pull request most recent head 19dc053. Consider uploading reports for the commit 19dc053 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3033   +/-   ##
=======================================
  Coverage   58.76%   58.76%           
=======================================
  Files         567      567           
  Lines       30360    30360           
  Branches     7483     7483           
=======================================
  Hits        17841    17841           
  Misses      12519    12519           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 179afb9...19dc053. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Dec 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants