Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added setimeout to let db drop replicate

  • Loading branch information...
commit 8d273a1fcd4eb5ae54758241d25559430141326c 1 parent 276ccd3
Christian Amor Kvalheim authored

Showing 1 changed file with 20 additions and 17 deletions. Show diff stats Hide diff stats

  1. +20 17 test/db_test.js
37 test/db_test.js
@@ -1396,24 +1396,27 @@ exports.shouldCorrectlyShowTheResultsFromIndexInformation = function(test) {
1396 1396 db.dropDatabase(function(err, result) {
1397 1397 test.equal(null, err);
1398 1398
1399   - // Get the admin database
1400   - db.admin().listDatabases(function(err, dbs) {
1401   - // Grab the databases
1402   - dbs = dbs.databases;
1403   - // Did we find the db
1404   - var found = false;
  1399 + // Wait to seconds to let it replicate across
  1400 + setTimeout(function() {
  1401 + // Get the admin database
  1402 + db.admin().listDatabases(function(err, dbs) {
  1403 + // Grab the databases
  1404 + dbs = dbs.databases;
  1405 + // Did we find the db
  1406 + var found = false;
  1407 +
  1408 + // Check if we have the db in the list
  1409 + for(var i = 0; i < dbs.length; i++) {
  1410 + if(dbs[i].name == 'integration_tests_to_drop') found = true;
  1411 + }
  1412 +
  1413 + // We should not find the databases
  1414 + if(process.env['JENKINS'] == null) test.equal(false, found);
1405 1415
1406   - // Check if we have the db in the list
1407   - for(var i = 0; i < dbs.length; i++) {
1408   - if(dbs[i].name == 'integration_tests_to_drop') found = true;
1409   - }
1410   -
1411   - // We should not find the databases
1412   - if(process.env['JENKINS'] == null) test.equal(false, found);
1413   -
1414   - db.close();
1415   - test.done();
1416   - });
  1416 + db.close();
  1417 + test.done();
  1418 + });
  1419 + }, 2000);
1417 1420 });
1418 1421 });
1419 1422 });

0 comments on commit 8d273a1

Please sign in to comment.
Something went wrong with that request. Please try again.