[Test] Increase registered callback's duration to avoid flakyness (#37243)

Previously the registered callback's duration is set too low (10ms) that 2 different OTel callbacks get called from OTel consecutively would trigger the registered callback again, making the test flaky.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #37243

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37243 from yijiem:otel-plugin-test-flake 70a1572cd2
PiperOrigin-RevId: 653717643
pull/37255/head
Yijie Ma 9 months ago committed by Copybara-Service
parent 80436121e7
commit 7a7211bcdc
  1. 6
      test/cpp/ext/otel/otel_plugin_test.cc

@ -1919,7 +1919,7 @@ TEST_F(OpenTelemetryPluginCallbackMetricsTest,
reporter.Report(double_gauge_handle, double_value_1++, kLabelValuesSet2,
kOptionalLabelValuesSet2);
},
grpc_core::Duration::Milliseconds(10) * grpc_test_slowdown_factor(),
grpc_core::Duration::Milliseconds(50) * grpc_test_slowdown_factor(),
integer_gauge_handle, double_gauge_handle);
int report_count_2 = 0;
int64_t int_value_2 = 1;
@ -1936,9 +1936,9 @@ TEST_F(OpenTelemetryPluginCallbackMetricsTest,
reporter.Report(double_gauge_handle, double_value_2++, kLabelValuesSet2,
kOptionalLabelValuesSet2);
},
grpc_core::Duration::Milliseconds(10) * grpc_test_slowdown_factor(),
grpc_core::Duration::Milliseconds(50) * grpc_test_slowdown_factor(),
integer_gauge_handle, double_gauge_handle);
constexpr int kIterations = 100;
constexpr int kIterations = 50;
MetricsCollectorThread collector{
this,
grpc_core::Duration::Milliseconds(100) * grpc_test_slowdown_factor(),

Loading…
Cancel
Save