[FIX] Trying long timeout for runbot

bzr revid: ddm@openerp.com-20131227165824-ae2tvwczt5pwq6we
This commit is contained in:
ddm
2013-12-27 17:58:24 +01:00
parent 09878aa45a
commit 315da9c809
2 changed files with 8 additions and 9 deletions
+2 -3
View File
@@ -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')
@@ -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);
});