Skip to content

Commit

Permalink
roachtest: prevent shared mutable state across c2c roachtest runs
Browse files Browse the repository at this point in the history
Previously, all `c2c/*` roachtests run with `--count` would provide
incomprehensible results because multiple roachtest runs of the same test would
override each other's state. Specifically, the latest call of
`test_spec.Run()`, would override the `test.Test` harness, and
`syncedCluster.Cluster` used by all other tests with the same registration.

This patch fixes this problem by moving all fields in `replicationSpec` that are
set during test execution (i.e. a `test_spec.Run` call), to a new
`replicationDriver` struct. Now, `replicationSpec` gets defined during test
registration and is shared across test runs, while `replicationDriver`
gets set within a test run.

Epic: None
Release note: None
  • Loading branch information
msbutler committed Apr 11, 2023
1 parent b7702e1 commit c8ddf08
Showing 1 changed file with 243 additions and 224 deletions.
Loading

0 comments on commit c8ddf08

Please sign in to comment.