Conversation
77aa06b to
71752f5
Compare
| sync.Mutex | ||
|
|
||
| // NoLock is used to disable locking in the mock provider. | ||
| NoLock bool |
There was a problem hiding this comment.
sorry, this didn't occur to me before. Would it work just to have a test that uses two (or more) separate provider instances so they don't share the mutex under the hood anyway? This would be instead of giving the option to disable the locking.
There was a problem hiding this comment.
The test runs share the same configuration, and I am not sure how would then differentiate the instance they should use.
There was a problem hiding this comment.
You can specify the provider for each run block:
provider "test" {
alias = "one"
}
provider "test" {
alias = "two"
}
run "one" {
providers = {
test = test.one
}
}
run "two" {
providers = {
test = test.two
}
}
Then the run blocks will use different provider instances, and they should be able to parallelise?
There was a problem hiding this comment.
Ah, good point. I had forgotten that feature was available in the test framework. That could be a solid approach.
I will check if that alias translates to the test provider somehow. Otherwise, we might still be using the same concrete struct.
|
Closed in favor for https://github.com/hashicorp/terraform/pull/37220/files |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #
Target Release
1.13.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry