You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2016/11/16 11:32:54 UTC
[3/4] fauxton commit: updated refs/heads/master to ff25441
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);