Commit Graph

3 Commits

Author SHA1 Message Date
Alex Leong 7edd886c91
test(multicluster): Wait for cluster store to be populated in test
The federated service watcher test has a race condition where we create a cluster store with a set of kubernetes manifests and then immediately begin testing queries to that cluster store.  If these queries are executed before the cluster store's informers process the kubernetes manifests, the queries can fail.

In the context of this test, this failure manifests as the read on the updates channel never returning, resulting in test timeouts.

We fix this by waiting for the cluster store to be populated before continuing with the test and issuing queries.

Signed-off-by: Alex Leong <alex@buoyant.io>
2025-04-11 14:41:56 -07:00
Oliver Gould 6501de61ed
fix(test): avoid duplicate registry errors (#13898)
The destination controller's cluster store registers a gague in its constructor. When this constructor is called multiple times (i.e. in tests), this can lead to a panic.

To avoid this panic, this change updates NewClusterStoreWithDecoder to accept a prometheus registry). The NewClusterStore constructor (used by the application's main) continues to use the default registry, but tests now construct their own temporary registries to avoid duplicate registration errors.
2025-04-03 15:05:24 -05:00
Alex Leong 752d1c9ea0
Add tests for federated service watcher (#13329)
Adds tests for the federated service watcher that exercise having remote and local clusters join and leave a federated service and ensuring that the correct proxy API updates are emitted.

Signed-off-by: Alex Leong <alex@buoyant.io>
2024-11-19 10:08:50 -08:00