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

logical/aws: Run Acceptance Tests in Parallel #5383

Merged
merged 5 commits into from
Sep 26, 2018

Conversation

joelthompson
Copy link
Contributor

The acceptance tests on master currently run in about 64 seconds for me; this brings their runtime down to 22 seconds, which is a much more pleasant feedback time. It also exposed a bug in the tests that required them to execute in a certain order to succeed; now they should be much more independent.

Starting an effort to paralleize AWS secret engine acceptance tests.
Currently they take over a minute to run, and this parallelizes the two
that explicitly call a 10-second sleep, reulting in a 10-second speedup
in test time.
Probably not needed, but future-proofing the code
AWS_ACCOUNT_ID environment variable is no longer being used; global
mutable state is a recipe for disaster when trying to run things in
parallel, and parallelizing the tests exposed a race condition in which
they were depending on the AWS_ACCOUNT_ID environment variable to be set
before they were run.

AWS_DEFAULT_REGION is still left as an environment variable because it
is required by AWS SDKs, but its configuration is now protected by a
sync.Once to ensure it only ever gets called a single time.
briankassouf
briankassouf previously approved these changes Sep 24, 2018
Copy link
Contributor

@briankassouf briankassouf left a comment

Choose a reason for hiding this comment

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

Looks good!

@briankassouf briankassouf merged commit 908a1b2 into hashicorp:master Sep 26, 2018
@joelthompson joelthompson deleted the aws_secret_parallel_tests branch September 26, 2018 00:26
joelthompson added a commit to joelthompson/vault that referenced this pull request Sep 26, 2018
The merge of hashicorp#5383 broke the tests due to some changes in the test style
that didn't actually cause a git merge conflict. This updates the tests
to the new style.
chrishoffman pushed a commit that referenced this pull request Oct 2, 2018
* Allow specifying role-default TTLs in AWS secret engine

* Add an acceptance test

* Add docs for AWS secret role-default TTLs

* Rename default_ttl to default_sts_ttl

* Return default_ttl as int64 instead of time.Duration

* Fix broken tests

The merge of #5383 broke the tests due to some changes in the test style
that didn't actually cause a git merge conflict. This updates the tests
to the new style.
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.

3 participants