Rewriting WebRTC output level tests to be more reliable under load.
commit7fb54b10aeebc34263831fa55307cb333e67dba2
authorphoglund <phoglund@chromium.org>
Tue, 12 May 2015 13:52:28 +0000 (12 06:52 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 May 2015 13:52:44 +0000 (12 13:52 +0000)
treecafae5ec801b319418a3009ad49774c3c66f6bf7
parent5ea9ee00271403b87b3475138a6d2409b08ac146
Rewriting WebRTC output level tests to be more reliable under load.

This greatly reduces the variance in test execution time when running
in parallel on a heavily loaded bot, in which setTimeout becomes
increasingly unpredictable. These tests were quite sensitive to load -
they run 200 consecutive setTimeout calls with short timeouts, but if
the machine is under load it can take up to 1000 ms to call back to
a 50 ms setTimeout. This means the test would take 200 * 1000 =
200 seconds to run, but it obviously times out long before then.

Running with this patch, the tests reliably stay under 10 seconds of
execution time even under the most heavy load, which is a massive
improvement to reliability. The only risk I see with this patch is that
the tests will become more resource-hungry when there are resources
available, so maybe they will starve out other sensitive tests?

BUG=472087

Review URL: https://codereview.chromium.org/1132483003

Cr-Commit-Position: refs/heads/master@{#329400}
content/test/data/media/webrtc_test_audio.js