Github user sebastianrothbucher commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/423#discussion_r30642593
  
    --- Diff: test/nightwatch_tests/helpers/helpers.js ---
    @@ -25,23 +26,31 @@ module.exports = {
     
         console.log("nano setting up database");
         // clean up the database we created previously
    -    nano.db.destroy(database, function (err, body, header) {
    -      if (err) {
    -        if (err.message != 'Database does not exist.' && err.message != 
'missing') {
    -          console.log('Error in setting up ' + database, err.message);
    -        }
    -      }
    -      // create a new database
    -      nano.db.create(database, function (err, body, header) {
    -        if (err) {
    -          console.log('Error in setting up ' + database, err.message);
    -        }
    +    async.parallel([
    +      function (cb) {
    +        nano.db.destroy(database, function (err, body, header) {
    +          if (err && err.message !== 'Database does not exist.' && 
err.message !== 'missing') {
    +            console.log('Error in setting up ' + database, err.message);
    +          }
    +          // create a new database
    +          nano.db.create(database, function (err, body, header) {
    +            if (err) {
    +              console.log('Error in setting up ' + database, err.message);
    +            }
    +            cb();
    +          });
    +        });
    +      },
    +      function (cb) {
             nano.db.create('_replicator', function (err, body, header) {
    --- End diff --
    
    k, got it - so we can in fact parallelize it. Then I'm with Ben: cool stuff!
    
    On Tue, May 19, 2015 at 10:21 PM, Robert Kowalski <notificati...@github.com>
    wrote:
    
    > In test/nightwatch_tests/helpers/helpers.js
    > <https://github.com/apache/couchdb-fauxton/pull/423#discussion_r30642107>:
    >
    > > +    async.parallel([
    > > +      function (cb) {
    > > +        nano.db.destroy(database, function (err, body, header) {
    > > +          if (err && err.message !== 'Database does not exist.' && 
err.message !== 'missing') {
    > > +            console.log('Error in setting up ' + database, 
err.message);
    > > +          }
    > > +          // create a new database
    > > +          nano.db.create(database, function (err, body, header) {
    > > +            if (err) {
    > > +              console.log('Error in setting up ' + database, 
err.message);
    > > +            }
    > > +            cb();
    > > +          });
    > > +        });
    > > +      },
    > > +      function (cb) {
    > >          nano.db.create('_replicator', function (err, body, header) {
    >
    > we depend on the replicator db in our tests, but once the cassim race
    > condition is fixed, we will have other systemdbs for testing automatically
    > on the cluster
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/couchdb-fauxton/pull/423/files#r30642107>.
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to