From 7db1491a85f63441bf8283a5faa658c8886dd249 Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Thu, 9 Apr 2020 12:14:42 +0200 Subject: [PATCH] Restore call's final stats collection in PC level framework Bug: webrtc:11479 Change-Id: I763e13315250519f391e3c9dc0f36fe84569844f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173320 Commit-Queue: Artem Titov Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#31040} --- test/pc/e2e/peer_connection_quality_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc index d97eeba15b..d60856a0a9 100644 --- a/test/pc/e2e/peer_connection_quality_test.cc +++ b/test/pc/e2e/peer_connection_quality_test.cc @@ -317,6 +317,15 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) { // Stop all client started tasks to prevent their access to any call related // objects after these objects will be destroyed during call tear down. executor_->Stop(); + // There is no guarantee, that last stats collection will happen at the end + // of the call, so we force it after executor, which is among others is doing + // stats collection, was stopped. + task_queue_->SendTask( + [&stats_poller]() { + // Get final end-of-call stats. + stats_poller.PollStatsAndNotifyObservers(); + }, + RTC_FROM_HERE); // We need to detach AEC dumping from peers, because dump uses |task_queue_| // inside. alice_->DetachAecDump();