Change connection ASSERT into metrics for the PC level framework.
Bug: webrtc:11504 Change-Id: I48b2f44a52b18fd4bb3e75e9ccdcd842ec1faaed Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174022 Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Andrey Logvin <landrey@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31142}
This commit is contained in:
parent
3b9fe99285
commit
4381af48b4
@ -351,6 +351,7 @@ if (rtc_include_tests) {
|
||||
":video_quality_metrics_reporter",
|
||||
"../..:field_trial",
|
||||
"../..:fileutils",
|
||||
"../..:perf_test",
|
||||
"../../../api:audio_quality_analyzer_api",
|
||||
"../../../api:libjingle_peerconnection_api",
|
||||
"../../../api:media_stream_interface",
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
#include "test/pc/e2e/stats_poller.h"
|
||||
#include "test/pc/e2e/test_peer_factory.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
#include "test/testsupport/perf_test.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
@ -342,6 +343,7 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
|
||||
real_test_duration_ = end_time - start_time;
|
||||
}
|
||||
|
||||
ReportGeneralTestResults();
|
||||
audio_quality_analyzer_->Stop();
|
||||
video_quality_analyzer_injection_helper_->Stop();
|
||||
for (auto& reporter : quality_metrics_reporters_) {
|
||||
@ -537,9 +539,10 @@ void PeerConnectionE2EQualityTest::SetupCall(const RunParams& run_params) {
|
||||
|
||||
ExchangeIceCandidates(&signaling_interceptor);
|
||||
// This means that ICE and DTLS are connected.
|
||||
ASSERT_TRUE_WAIT(bob_->IsIceConnected(), kDefaultTimeoutMs);
|
||||
ASSERT_TRUE_WAIT(alice_->IsIceConnected(), kDefaultTimeoutMs);
|
||||
RTC_LOG(INFO) << "Call is started (all peers are connected).";
|
||||
WAIT(bob_->IsIceConnected(), kDefaultTimeoutMs);
|
||||
bob_connected_ = bob_->IsIceConnected();
|
||||
WAIT(alice_->IsIceConnected(), kDefaultTimeoutMs);
|
||||
alice_connected_ = alice_->IsIceConnected();
|
||||
}
|
||||
|
||||
void PeerConnectionE2EQualityTest::ExchangeOfferAnswer(
|
||||
@ -635,6 +638,15 @@ void PeerConnectionE2EQualityTest::TearDownCall() {
|
||||
media_helper_.reset();
|
||||
}
|
||||
|
||||
void PeerConnectionE2EQualityTest::ReportGeneralTestResults() {
|
||||
test::PrintResult(
|
||||
"alice_connected", "", test_case_name_, alice_connected_, "unitless",
|
||||
/*important=*/false, test::ImproveDirection::kBiggerIsBetter);
|
||||
test::PrintResult(
|
||||
"bob_connected", "", test_case_name_, bob_connected_, "unitless",
|
||||
/*important=*/false, test::ImproveDirection::kBiggerIsBetter);
|
||||
}
|
||||
|
||||
Timestamp PeerConnectionE2EQualityTest::Now() const {
|
||||
return clock_->CurrentTime();
|
||||
}
|
||||
|
||||
@ -95,6 +95,7 @@ class PeerConnectionE2EQualityTest
|
||||
const std::vector<rtc::scoped_refptr<TestVideoCapturerVideoTrackSource>>&
|
||||
sources);
|
||||
void TearDownCall();
|
||||
void ReportGeneralTestResults();
|
||||
Timestamp Now() const;
|
||||
|
||||
Clock* const clock_;
|
||||
@ -132,6 +133,9 @@ class PeerConnectionE2EQualityTest
|
||||
// This task queue will be created before call set up and will be destroyed
|
||||
// immediately before call tear down.
|
||||
std::unique_ptr<TaskQueueForTest> task_queue_;
|
||||
|
||||
bool alice_connected_ = false;
|
||||
bool bob_connected_ = false;
|
||||
};
|
||||
|
||||
} // namespace webrtc_pc_e2e
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user