cockroachdb / cockroachdb/cockroach
testutils: not currently possible to make metamorphic "constants" vary across tests
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
The metamorphic constant framework has two shortcomings:
- it assumes that metamorphic constants are initialized in the global scope and so all definitions are available at `init` time
- it prints out the constant customizations in a format that interferes with our logging system.
As a result, it is difficult to use the framework for a value that should be different in every test in a package.
**Expected behavior**
We should be able to use the functions to construct metamorphic constants after a test has started running already.
The printouts should be compatible with the logging system.
(Found while working on #89170)
Jira issue: CRDB-29667
Contributor guide
Assessment
This issue has not been assessed yet.