consul/internal
Matt Keeler a7774a9538
Introduce randomized timings and reproducible randomization into controller integration tests. (#19393)
As the V2 architecture hinges on eventual consistency and controllers reconciling the existing state in response to writes, there are potential issues we could run into regarding ordering and timing of operations. We want to be able to guarantee that given a set of resources the system will always eventually get to the desired correct state. The order of resource writes and delays in performing those writes should not alter the final outcome of reaching the desired state.

To that end, this commit introduces arbitrary randomized delays before performing resources writes into the `resourcetest.Client`. Its `PublishResources` method was already randomizing the order of resource writes. By default, no delay is added to normal writes and deletes but tests can opt-in via either passing hard coded options when creating the `resourcetest.Client` or using the `resourcetest.ConfigureTestCLIFlags` function to allow processing of CLI parameters.

In addition to allowing configurability of the request delay min and max, the client also has a configurable random number generator seed. When Using the CLI parameter helpers, a test log will be written noting the currently used settings. If the test fails then you can reproduce the same delays and order randomizations by providing the seed during the previous test failure.
2023-11-08 10:45:25 -05:00
..
auth temporarily disallow L7 traffic permissions (#19322) 2023-11-02 13:16:08 -05:00
catalog Introduce randomized timings and reproducible randomization into controller integration tests. (#19393) 2023-11-08 10:45:25 -05:00
controller v2tenancy: register tenancy controller deps (#19531) 2023-11-07 08:06:10 -06:00
go-sso [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
mesh add DeliverLatest as common function for use by Manager and ProxyTracker Open (#19564) 2023-11-07 23:03:37 +00:00
multicluster Net 5875 - Create the Exported Services Resources (#19117) 2023-10-26 19:34:15 +05:30
protohcl protohcl: allow attribute syntax for all map fields (#19108) 2023-10-06 19:07:08 -04:00
protoutil mesh: compute more of the xRoute features into ComputedRoutes (#18980) 2023-09-22 16:13:24 -05:00
radix [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
resource Introduce randomized timings and reproducible randomization into controller integration tests. (#19393) 2023-11-08 10:45:25 -05:00
resourcehcl mesh: rename Upstreams and UpstreamsConfiguration to Destinations* (#18995) 2023-09-25 12:03:45 -06:00
storage resource: Require scope for resource registration (#18635) 2023-09-01 09:44:53 -05:00
tenancy v2tenancy: register tenancy controller deps (#19531) 2023-11-07 08:06:10 -06:00
testing/golden NET-5397 - wire up destination golden tests from sidecar-proxy controller for xds controller and xdsv2 (#19167) 2023-10-24 09:33:23 -06:00
tools Remove old build tags (#19128) 2023-10-10 10:58:06 -04:00