brson · GitHub

What have you changed? (mandatory)

These methods are scary and sprawling, and also almost entirely unused. This patch deletes the methods and instead centralizes the little error-cloning logic that is actually used into the FixtureStore test type. No more maintaining those maybe_clone methods nor being tempted to use them in production code.

Fixes #4923

I've selectively tested a variety of tests that use FixtureStore, but there are some flaky tests on my computer, and I am leaning on CI to find cases I missed while continuing to test locally.

The first commit isn't strictly necessary but removes a non-test dependency on FixtureStore. There's more that could be done to clean up the pattern around the check_supported methods, but not for this PR.

What are the type of the changes? (mandatory)

  • Engineering (engineering change which doesn't change any feature or fix any issue)

How has this PR been tested? (mandatory)

Selective unit testing.

Does this PR affect documentation (docs) or release note? (mandatory)

No

Does this PR affect tidb-ansible update? (mandatory)

No

Refer to a related PR or issue link (optional)

Benchmark result if necessary (optional)

Add a few positive/negative examples (optional)

Read the original on github.com ↗