docs: Document best practices for parallel testing #1
Labels
documentation
Improvements or additions to documentation
subsystem/tests
Issues and feature requests related to the testing framework.
Historically the testing framework didn't have any way to run acceptance tests in parallel. We used a separate tool to achieve this and we still use it today. This worked & works in context of official providers (
github.com/terraform-providers/*
), but not in others and most importantly not on developer's workstations.This is one of the reasons @bflad introduced
ParallelTest
in hashicorp/terraform#18688The goal is to document this with some examples from provider which already use this helper function.
There are clear benefits we can gain by parallel testing:
parallelism=10
which means that it will issue up to 10 requests in parallel by default. Parallel testing therefore reflects how users would use the provider in the wild.There are however some (side) effects of this:
mutexkv
to practically prevent Terraform from sending parallel requests to the affected API.The text was updated successfully, but these errors were encountered: