-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Does the feature exist in the most recent commit?
No.
Why do we need this feature?
The commit (64be1c7) added logic to delete test environments during normal test Teardown (rather than during static teardown). This was added to fix tests where Environments were doing threading operations, and the above commit started to join those threads earlier than the end of the program to avoid the cases where thread-joining was causing issues during destruction.
As the commit acknowledges, though, this was a breaking change for users who call RUN_ALL_TESTS multiple times: any tests which do that call multiple times face failures due to potential early-destruction of their environments.
Describe the proposal.
Given that the delete_environment_on_teardown
logic is already gated behind a bool, adding a program flag to opt-out of that behavior would allow users to use the previous behavior where static teardown still manages the Environment lifetimes.
This flag could still use the new behavior by default, but having the explicit opt-out path would enable a self-service fix path for users broken by the above change.
Is the feature specific to an operating system, compiler, or build system version?
No, the logic in question is shared across platforms.