cockroachdb / cockroachdb/cockroach

testutils: not currently possible to make metamorphic "constants" vary across tests

Open
#106,667 3 comments 0 reactions 0 assignees View on GitHub
A-testeng-foundations A-testing C-bug T-testeng
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

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.