You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a saying (paraphrasing) that it always takes more work
removing unwanted complexity than it takes to add it. This is an
example of that.
Prior to this commit, there was an "interesting" propagation of the
flag that decides whether or not to define a test tenant for test
servers and clusters. In a nutshell, we had:
- an "input" flag in `base.TestServerArgs`, which remained mostly immutable
- a boolean decided once by `ShouldStartDefaultTestTenant()` either in:
- `serverutils.StartServerOnlyE`
- or `testcluster.Start`
- that boolean choice was then propagated to `server.testServer` via
_another_ boolean config flag in `server.BaseConfig`
- both the 2nd boolean and the original input flag were then again
checked when the time came to do the work (in `maybeStartDefaultTestTenant`).
Additional complexity was then incurred by the need of `TestCluster`
to make the determination just once (and not once per server).
This commit cuts through all the layers of complexity by simply
propagating the choice of `ShouldStartDefaultTestTenant()` back into
the `TestServerArgs` and only ever reading from that subsequently.
Release note: None
0 commit comments