webrtc/test/pc
Tommi 443e7ada92 Synchronize final stats collection in E2E quality tests
The PeerConnectionE2EQualityTest framework previously lost final
metrics, such as payload_bytes_received, because it did not wait for
asynchronous RTCStatsCollector::GetStats() calls to complete during test
teardown.

This change ensures all stats are captured by:
- Tracking pending asynchronous requests in InternalStatsObserver
  using a counter and a new IsPolling() method.
- Implementing a synchronization point in the test runner that uses
  the time controller to wait until StatsPoller reports no active
  polling.
- Adding an optional polling delay to StatsPoller to help simulate
  and verify fixes for race conditions in asynchronous stat
  delivery.

Bug: webrtc:481443652
Change-Id: Ie689bdab4843780c765e8ffd2668d63863328026
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/461000
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47295}
2026-03-30 05:24:04 -07:00
..
e2e Synchronize final stats collection in E2E quality tests 2026-03-30 05:24:04 -07:00
sctp Remove Chrome and internal usage of libjingle_peerconnection_api 2025-12-08 15:46:44 -08:00