hashicorp / hashicorp/terraform-plugin-testing

Intermittent test failures with provider tests: `... text file busy` error

Open
#429 2 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
68
Forks
22
Avg merge
2d 12h
Merged PRs (30d)
1

Description

### terraform-plugin-testing version
```
v1.11.0
```

### Behavior
https://github.com/hashicorp/terraform-plugin-sdk/actions/runs/13107424835/job/36564475352?pr=1420#step:7:602

When running provider tests, you may encounter an intermittent error similar to below:
```bash
cannot run Terraform provider tests: error calling terraform version command: fork/exec /tmp/plugintest-terraform3455380737/terraform: text file busy
```

[The error is being raised by the testing framework](https://github.com/hashicorp/terraform-plugin-testing/blob/ccb1bb1839dedce9b2f3e2011245430642378f89/internal/plugintest/helper.go#L91), so it's possible some of Terraform environment setup may not be thread safe, possibly related to hc-install (see referenced issue).

We had a 2nd report of this internally from the HCP provider, again from the `terraform version` command:
https://github.com/hashicorp/terraform-provider-hcp/actions/runs/13190402272/job/36822133356

### References
- Potentially related to https://github.com/hashicorp/hc-install/issues/35

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.