Running scenario quality unit tests in simulated time.

This is to avoid inconsistent/flaky behavior on mobile bots.

Bug: webrtc:10365
Change-Id: I52ab4f9ef92b10329c1eac502adfcf2886058114
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131329
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27465}
This commit is contained in:
Sebastian Jansson 2019-04-05 12:49:35 +02:00 committed by Commit Bot
parent 7b7485b796
commit 363fb7e050

View File

@ -32,7 +32,7 @@ void CreateAnalyzedStream(Scenario* s,
TEST(ScenarioAnalyzerTest, PsnrIsHighWhenNetworkIsGood) {
VideoQualityAnalyzer analyzer;
{
Scenario s;
Scenario s("", /*real_time*/ false);
NetworkNodeConfig good_network;
good_network.simulation.bandwidth = DataRate::kbps(1000);
CreateAnalyzedStream(&s, good_network, &analyzer);
@ -46,7 +46,7 @@ TEST(ScenarioAnalyzerTest, PsnrIsHighWhenNetworkIsGood) {
TEST(ScenarioAnalyzerTest, PsnrIsLowWhenNetworkIsBad) {
VideoQualityAnalyzer analyzer;
{
Scenario s;
Scenario s("", /*real_time*/ false);
NetworkNodeConfig bad_network;
bad_network.simulation.bandwidth = DataRate::kbps(100);
bad_network.simulation.loss_rate = 0.02;