xdsclient: Fix flakyness in `TestResourceUpdateMetrics` in the case of repeated NACKs (#8363)

This commit is contained in:
Purnesh Dixit 2025-05-28 09:41:01 +05:30 committed by GitHub
parent 4cab0e6dc6
commit 28128e0b1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -296,5 +296,5 @@ func (r *testMetricsReporter) waitForMetric(ctx context.Context, metricsDataWant
// ReportMetric sends the metrics data to the metricsCh channel.
func (r *testMetricsReporter) ReportMetric(m any) {
r.metricsCh.Send(m)
r.metricsCh.Replace(m)
}

View File

@ -40,7 +40,7 @@ import (
// to send valid and invalid LDS updates, and verifies that the expected metrics
// for both good and bad updates are emitted.
func (s) TestResourceUpdateMetrics(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout*1000)
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()
tmr := newTestMetricsReporter()