Permalink
Browse files

give mongo time to create the 2d index

  • Loading branch information...
1 parent 8f473b0 commit d96fbc6cfeb10a2e7d6a5be7ba80e328163e2056 @aheckmann aheckmann committed May 16, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 test/model.querying.test.js
View
12 test/model.querying.test.js
@@ -1198,11 +1198,13 @@ module.exports = {
Test.create({ loc: [ 10, 20 ]}, { loc: [ 40, 90 ]}, function (err) {
should.strictEqual(err, null);
- Test.find({ loc: { $near: [30, 40] }}, function (err, docs) {
- db.close();
- should.strictEqual(err, null);
- docs.length.should.equal(2);
- });
+ setTimeout(function () {
+ Test.find({ loc: { $near: [30, 40] }}, function (err, docs) {
+ db.close();
+ should.strictEqual(err, null);
+ docs.length.should.equal(2);
+ });
+ }, 400);
});
}

0 comments on commit d96fbc6

Please sign in to comment.