prometheus/discovery/kubernetes
Frederic Branczyk 7b1c0d6b66
discovery/kubernetes: Fix incorrect premature break of reading results
Previously `max` results stopped reading from results in tests
prematurely, as it stopped when `max` number of items were received from
the channel instead of `max` number of unique target groups received.
This caused flaky tests where the same target group was received
multiple times, as Kubernetes informers may emit the same event multiple
times.

Before this patch, running this test repeatedly failed eventually. After
this patch I have run the test many thousand times without failure.

```bash
go test -run TestEndpointsDiscoveryNamespaces -count 1000 -test.v
```

Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-06-11 16:08:28 +02:00
..
client_metrics.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
endpoints.go discovery/kubernetes: remove extraneous parameters from send() 2020-02-18 17:36:57 +01:00
endpoints_test.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
ingress.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
ingress_test.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
kubernetes.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
kubernetes_test.go discovery/kubernetes: Fix incorrect premature break of reading results 2020-06-11 16:08:28 +02:00
node.go discovery/kubernetes: remove extraneous parameters from send() 2020-02-18 17:36:57 +01:00
node_test.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
pod.go discovery/kubernetes: remove extraneous parameters from send() 2020-02-18 17:36:57 +01:00
pod_test.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00
service.go add service type metadata to kubernetes_sd_config service role #6496 (#6684) 2020-02-25 09:22:14 +01:00
service_test.go update kubernetes to v1.18.x and update ingress apiVersion 2020-06-01 08:26:50 -07:00