mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1501809 - Fix Raptor tp6 'main application timed out'; r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D9714 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9529a31c66
commit
562d40574c
@ -13,7 +13,7 @@ webext_dir = os.path.join(os.path.dirname(here), 'webext', 'raptor')
|
||||
LOG = get_proxy_logger(component="raptor-gen-test-config")
|
||||
|
||||
|
||||
def gen_test_config(browser, test, cs_port, b_port=0):
|
||||
def gen_test_config(browser, test, cs_port, post_startup_delay, b_port=0):
|
||||
LOG.info("writing test settings into background js, so webext can get it")
|
||||
|
||||
data = """// this file is auto-generated by raptor, do not edit directly
|
||||
@ -22,10 +22,11 @@ function getTestConfig() {
|
||||
"cs_port": "%d",
|
||||
"test_name": "%s",
|
||||
"test_settings_url": "http://127.0.0.1:%d/%s.json",
|
||||
"post_startup_delay": "%s",
|
||||
"benchmark_port": "%d"};
|
||||
}
|
||||
|
||||
""" % (browser, cs_port, test, cs_port, test, b_port)
|
||||
""" % (browser, cs_port, test, cs_port, test, post_startup_delay, b_port)
|
||||
|
||||
webext_background_script = (os.path.join(webext_dir, "auto_gen_test_config.js"))
|
||||
|
||||
|
@ -54,6 +54,7 @@ class Raptor(object):
|
||||
self.control_server = None
|
||||
self.playback = None
|
||||
self.benchmark = None
|
||||
self.post_startup_delay = 30000 # raptor webext pause time after browser startup
|
||||
|
||||
# Create the profile; for geckoview we want a firefox profile type
|
||||
if self.config['app'] == 'geckoview':
|
||||
@ -139,6 +140,7 @@ class Raptor(object):
|
||||
gen_test_config(self.config['app'],
|
||||
test['name'],
|
||||
self.control_server.port,
|
||||
self.post_startup_delay,
|
||||
benchmark_port)
|
||||
|
||||
# for android we must make the benchmarks server available to the device
|
||||
@ -232,6 +234,9 @@ class Raptor(object):
|
||||
|
||||
# convert to seconds and account for page cycles
|
||||
timeout = int(timeout / 1000) * int(test['page_cycles'])
|
||||
# account for the pause the raptor webext runner takes after browser startup
|
||||
timeout += int(self.post_startup_delay / 1000)
|
||||
|
||||
try:
|
||||
elapsed_time = 0
|
||||
while not self.control_server._finished:
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
// when the browser starts this webext runner will start automatically; we
|
||||
// want to give the browser some time (ms) to settle before starting tests
|
||||
var postStartupDelay = 30000;
|
||||
var postStartupDelay;
|
||||
|
||||
// delay (ms) between pageload cycles
|
||||
var pageCycleDelay = 1000;
|
||||
@ -414,6 +414,7 @@ function runner() {
|
||||
csPort = config.cs_port;
|
||||
browserName = config.browser;
|
||||
benchmarkPort = config.benchmark_port;
|
||||
postStartupDelay = config.post_startup_delay;
|
||||
|
||||
getBrowserInfo().then(function() {
|
||||
getTestSettings().then(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user