From 315da9c80989198f8aaf9f0921ea93707f2ebd89 Mon Sep 17 00:00:00 2001 From: ddm Date: Fri, 27 Dec 2013 17:58:24 +0100 Subject: [PATCH] [FIX] Trying long timeout for runbot bzr revid: ddm@openerp.com-20131227165824-ae2tvwczt5pwq6we --- addons/website/tests/test_ui.py | 5 ++--- addons/website/tests/ui_suite/banner_tour_test.js | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/addons/website/tests/test_ui.py b/addons/website/tests/test_ui.py index e8c5abee871..259985ebbd5 100644 --- a/addons/website/tests/test_ui.py +++ b/addons/website/tests/test_ui.py @@ -43,7 +43,7 @@ class WebsiteUiTest(unittest.TestCase): class WebsiteUiSuite(unittest.TestSuite): # timeout in seconds - def __init__(self, testfile, options, timeout=20.0): + def __init__(self, testfile, options, timeout=60.0): self._testfile = testfile self._timeout = timeout self._options = options @@ -77,9 +77,8 @@ class WebsiteUiSuite(unittest.TestSuite): last_check_time = time.time() self._options['timeout'] = self._timeout - #self._options['port'] = tools.config.get('xmlrpc_port', 80) + self._options['port'] = tools.config.get('xmlrpc_port', 80) self._options['db'] = tools.config.get('db_name', '') - self._options['host'] = tools.config.get('db_name', 'localhost') # TODO Use correct key self._options['user'] = 'admin' self._options['password'] = tools.config.get('admin_passwd', 'admin') diff --git a/addons/website/tests/ui_suite/banner_tour_test.js b/addons/website/tests/ui_suite/banner_tour_test.js index 162e2049e78..0d855a13e5c 100644 --- a/addons/website/tests/ui_suite/banner_tour_test.js +++ b/addons/website/tests/ui_suite/banner_tour_test.js @@ -4,13 +4,13 @@ var waitFor = testRunner.waitFor; testRunner.run(function testBannerTour (page) { page.evaluate(function () { localStorage.clear(); }); - waitFor(function () { + waitFor(function clientReady () { return page.evaluate(function () { return window.openerp && window.openerp.website && window.openerp.website.TestConsole && window.openerp.website.TestConsole.test('banner'); }); - }, function () { + }, function executeTest () { var before = page.evaluate(function () { var result = { carousel: $('#wrap [data-snippet-id=carousel]').length, @@ -19,7 +19,7 @@ testRunner.run(function testBannerTour (page) { window.openerp.website.TestConsole.test('banner').run(true); return result; }); - waitFor(function () { + waitFor(function testExecuted () { var after = page.evaluate(function () { if ($('button[data-action=edit]').is(":visible")) { return { @@ -29,9 +29,9 @@ testRunner.run(function testBannerTour (page) { } }); return after && after.carousel === before.carousel + 1 && after.columns === before.columns + 1; - }, function () { + }, function finish () { console.log('{ "event": "success" }'); phantom.exit(); - }, 15000); - }, 5000); + }, 25000); + }, 25000); }); \ No newline at end of file