Fix flaky TestServer_ReloadInitialUpstreams (#3758)
With the KMS changes this should never have worked at all (because the different databases means the credentials conveyed after the KMS-based authentication would never be valid). However, it was sometimes passing because of a race condition: the worker could be found in the database before the new credentials were returned to the worker, causing the worker to start at the KMS step with the second controller. This changes the test to use the same database for two controllers, but to only ever have one running at a time, and uses a sequence of two changed (or unchanged, depending) status updates from the worker to ensure that the reload was successful.
This commit is contained in:
1 parent
d158c1475b
commit
b64eadedbf
3 files changed
+77
-31
No files matched your search
@@ -810,6 +810,7 @@ func (tc *TestController) AddClusterControllerMember(t testing.TB, opts *TestCon
|
||||
DefaultPassword: tc.b.DevPassword,
|
||||
DisableKmsKeyCreation: true,
|
||||
DisableAuthMethodCreation: true,
|
||||
DisableAutoStart: opts.DisableAutoStart,
|
||||
PublicClusterAddr: opts.PublicClusterAddr,
|
||||
WorkerStatusGracePeriodDuration: opts.WorkerStatusGracePeriodDuration,
|
||||
LivenessTimeToStaleDuration: opts.LivenessTimeToStaleDuration,
|
||||
|
||||
Reference in new issue
Block a user