Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added setimeout to let db drop replicate

  • Loading branch information...
commit 8d273a1fcd4eb5ae54758241d25559430141326c 1 parent 276ccd3
Christian Amor Kvalheim authored
Showing with 20 additions and 17 deletions.
  1. +20 −17 test/db_test.js
37 test/db_test.js
View
@@ -1396,24 +1396,27 @@ exports.shouldCorrectlyShowTheResultsFromIndexInformation = function(test) {
db.dropDatabase(function(err, result) {
test.equal(null, err);
- // Get the admin database
- db.admin().listDatabases(function(err, dbs) {
- // Grab the databases
- dbs = dbs.databases;
- // Did we find the db
- var found = false;
+ // Wait to seconds to let it replicate across
+ setTimeout(function() {
+ // Get the admin database
+ db.admin().listDatabases(function(err, dbs) {
+ // Grab the databases
+ dbs = dbs.databases;
+ // Did we find the db
+ var found = false;
+
+ // Check if we have the db in the list
+ for(var i = 0; i < dbs.length; i++) {
+ if(dbs[i].name == 'integration_tests_to_drop') found = true;
+ }
+
+ // We should not find the databases
+ if(process.env['JENKINS'] == null) test.equal(false, found);
- // Check if we have the db in the list
- for(var i = 0; i < dbs.length; i++) {
- if(dbs[i].name == 'integration_tests_to_drop') found = true;
- }
-
- // We should not find the databases
- if(process.env['JENKINS'] == null) test.equal(false, found);
-
- db.close();
- test.done();
- });
+ db.close();
+ test.done();
+ });
+ }, 2000);
});
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.