Bug 1258020 - Increase timeouts for network bandwidth limiting tests. Netflix takes a LONG time to load when bandwidth is low. r?SingingTree, r?maja_zf draft
authorSyd Polk <spolk@mozilla.com>
Thu, 24 Mar 2016 11:49:05 -0500
changeset 345967 66135da48a04e2a9f61be3134419b2133965c7c5
parent 345966 3b74da083e58b7464159789e20431979713842bd
child 517290 f61847bb51815a4c710c05b2eed10ccb8ccea744
push id14200
push userspolk@mozilla.com
push dateWed, 30 Mar 2016 17:36:15 +0000
reviewersSingingTree, maja_zf
bugs1258020
milestone48.0a1
Bug 1258020 - Increase timeouts for network bandwidth limiting tests. Netflix takes a LONG time to load when bandwidth is low. r?SingingTree, r?maja_zf MozReview-Commit-ID: 3mukTlWesby
dom/media/test/external/external_media_harness/testcase.py
dom/media/test/external/external_media_tests/playback/test_ultra_low_bandwidth.py
--- a/dom/media/test/external/external_media_harness/testcase.py
+++ b/dom/media/test/external/external_media_harness/testcase.py
@@ -117,26 +117,25 @@ class NetworkBandwidthTestCase(MediaTest
         BrowserMobProxyTestCaseMixin.setUp(self)
         self.proxy = self.create_browsermob_proxy()
 
     def tearDown(self):
         super(NetworkBandwidthTestCase, self).tearDown()
         BrowserMobProxyTestCaseMixin.tearDown(self)
         self.proxy = None
 
-    def run_videos(self):
+    def run_videos(self, timeout=60):
         """
         Run each of the videos in the video list. Raises if something goes
         wrong in playback.
         """
         with self.marionette.using_context('content'):
             for url in self.video_urls:
-                video = VP(self.marionette, url,
-                                       stall_wait_time=60,
-                                       set_duration=60)
+                video = VP(self.marionette, url, stall_wait_time=60,
+                           set_duration=60, timeout=timeout)
                 self.run_playback(video)
 
 
 class VideoPlaybackTestsMixin(object):
 
     """
     Test MSE playback in HTML5 video element.
 
@@ -183,25 +182,25 @@ class VideoPlaybackTestsMixin(object):
 class NetworkBandwidthTestsMixin(object):
 
     """
         Test video urls with various bandwidth settings.
     """
 
     def test_playback_limiting_bandwidth_250(self):
         self.proxy.limits({'downstream_kbps': 250})
-        self.run_videos()
+        self.run_videos(timeout=120)
 
     def test_playback_limiting_bandwidth_500(self):
         self.proxy.limits({'downstream_kbps': 500})
-        self.run_videos()
+        self.run_videos(timeout=120)
 
     def test_playback_limiting_bandwidth_1000(self):
         self.proxy.limits({'downstream_kbps': 1000})
-        self.run_videos()
+        self.run_videos(timeout=120)
 
 
 reset_adobe_gmp_script = """
 navigator.requestMediaKeySystemAccess('com.adobe.primetime',
 [{initDataType: 'cenc'}]).then(
     function(access) {
         marionetteScriptFinished('success');
     },
--- a/dom/media/test/external/external_media_tests/playback/test_ultra_low_bandwidth.py
+++ b/dom/media/test/external/external_media_tests/playback/test_ultra_low_bandwidth.py
@@ -7,9 +7,9 @@ from marionette import BrowserMobProxyTe
 from external_media_harness.testcase import NetworkBandwidthTestCase
 
 
 class TestUltraLowBandwidth(NetworkBandwidthTestCase,
                                     BrowserMobProxyTestCaseMixin):
 
     def test_playback_limiting_bandwidth_160(self):
         self.proxy.limits({'downstream_kbps': 160})
-        self.run_videos()
+        self.run_videos(timeout=120)