Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 75812200BC1 for ; Wed, 16 Nov 2016 12:32:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 743A0160B1A; Wed, 16 Nov 2016 11:32:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E49E9160B08 for ; Wed, 16 Nov 2016 12:32:53 +0100 (CET) Received: (qmail 7049 invoked by uid 500); 16 Nov 2016 11:32:53 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 7023 invoked by uid 99); 16 Nov 2016 11:32:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2016 11:32:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C8042E00C7; Wed, 16 Nov 2016 11:32:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: garren@apache.org To: commits@couchdb.apache.org Date: Wed, 16 Nov 2016 11:32:54 -0000 Message-Id: <80a81403d82a416e844351ffda7233f5@git.apache.org> In-Reply-To: <5228a67f0cd54c868dd643384ca25cf0@git.apache.org> References: <5228a67f0cd54c868dd643384ca25cf0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/4] fauxton commit: updated refs/heads/master to ff25441 archived-at: Wed, 16 Nov 2016 11:32:54 -0000 http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a50108b0/test/nightwatch_tests/custom-commands/helper.js ---------------------------------------------------------------------- diff --git a/test/nightwatch_tests/custom-commands/helper.js b/test/nightwatch_tests/custom-commands/helper.js index f558d14..1a183ef 100644 --- a/test/nightwatch_tests/custom-commands/helper.js +++ b/test/nightwatch_tests/custom-commands/helper.js @@ -9,6 +9,8 @@ exports.checkForDocumentCreated = function checkForDocumentCreated (url, timeout const intervalId = setInterval(() => { request(url, (er, res, body) => { + console.log(url, res.statusCode); + if (res && /^2..$/.test(res.statusCode)) { clearTimeout(timeOutId); console.log('check for doc created successful'); @@ -26,8 +28,14 @@ exports.checkForDatabaseCreated = function checkForDatabaseCreated (couchUrl, da }, timeout); const intervalId = setInterval(() => { - request(couchUrl + '/_all_dbs', function (er, res, body) { + const rand = Math.round(Math.random() * 10000000); + request(couchUrl + '/_all_dbs?cachebust=' + rand, function (er, res, body) { if (body) { + console.log(couchUrl + '/_all_dbs?cachebust=' + rand); + console.log('list of databases:'); + console.log(body); + console.log("_______________________"); + const reg = new RegExp('"' + databaseName + '"', 'g'); if (reg.test(body)) { clearTimeout(timeOutId);