Skip to content

Instantly share code, notes, and snippets.

@joewagner
Last active December 15, 2015 19:49
Show Gist options
  • Save joewagner/5314301 to your computer and use it in GitHub Desktop.
Save joewagner/5314301 to your computer and use it in GitHub Desktop.
mongoose.js failing tests
You're not testing shards!
Please set the MONGOOSE_SHARD_TEST_URI env variable.
e.g: `mongodb://localhost:27017/database
Sharding must already be enabled on your database
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
You're not testing replica sets!
Please set the MONGOOSE_SET_TEST_URI env variable.
e.g: `mongodb://localhost:27017/db,mongodb://localhost…`
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․not testing mongodb 2.4 features
․․․․not testing mongodb 2.4 features
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
✖ 23 of 921 tests failed:
1) connections: errors event fires with one listener:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
2) connections: errors should occur without hanging when password with special chars is used (gh-460):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
3) model: update: works:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
4) model: update: casts doc arrays:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
5) model: update: handles $pushAll array of docs:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
6) model: update: handles $pull of object literal array of docs (gh-542):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
7) model: update: handles weird casting (gh-479):
Error: connection closed
at Server.connect.connectionPool.on.server._serverState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:616:45)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:154:15)
at EventEmitter.emit (events.js:99:17)
at Socket.closeHandler (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:491:12)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.destroyed (net.js:358:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
8) model: update: handles date casting (gh-479):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
9) model: update: handles $addToSet (gh-545):
TypeError: Cannot read property 'owners' of undefined
at Context.<anonymous> (/Users/jwagner/GitHub/mongoose/test/model.update.test.js:371:21)
at Test.Runnable.run (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:196:15)
at Runner.runTest (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:343:10)
at Runner.runTests.next (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:389:12)
at next (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:269:14)
at Runner.hooks (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:278:7)
at next (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:226:23)
at Runner.hook (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:246:5)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
10) model: update: handles $addToSet with $each (gh-545):
TypeError: Cannot read property 'owners' of undefined
at Context.<anonymous> (/Users/jwagner/GitHub/mongoose/test/model.update.test.js:395:21)
at Test.Runnable.run (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:196:15)
at Runner.runTest (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:343:10)
at Runner.runTests.next (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:389:12)
at next (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:269:14)
at Runner.hooks (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:278:7)
at next (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:226:23)
at Runner.hook (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runner.js:246:5)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
11) model: update: handles $pop and $unset (gh-574):
Error: failed to connect to [localhost:27017]
at Server.connect.connectionPool.on.server._serverState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:569:74)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:139:15)
at EventEmitter.emit (events.js:99:17)
at Socket.errorHandler (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:475:10)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.self.errorEmitted (net.js:329:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
12) model: update: works with nested positional notation:
Error: connection closed
at Server.connect.connectionPool.on.server._serverState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:616:45)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:154:15)
at EventEmitter.emit (events.js:99:17)
at Socket.closeHandler (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:491:12)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.destroyed (net.js:358:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
13) model: update: handles $pull with obj literal (gh-542):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
14) model: update: handles $pull of obj literal and nested $in:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
15) model: update: handles $pull and nested $nin:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
16) model: update: updates numbers atomically:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
17) model: update: passes number of affected docs:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
18) model: update: updates a number to null (gh-640):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
19) model: update: handles $pull from Mixed arrays (gh-735):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
20) model: update: handles $push with $ positionals (gh-1057):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
21) model: update: handles nested paths starting with numbers (gh-1062):
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
22) model: update: honors strict schemas works:
Error: timeout of 2000ms exceeded
at Object.<anonymous> (/Users/jwagner/GitHub/mongoose/node_modules/mocha/lib/runnable.js:167:14)
at Timer.list.ontimeout (timers.js:101:19)
23) model: update: mongodb 2.4 features "before all" hook:
Error: connection closed
at Server.connect.connectionPool.on.server._serverState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:606:24)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:154:15)
at EventEmitter.emit (events.js:99:17)
at Socket.closeHandler (/Users/jwagner/GitHub/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:491:12)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.destroyed (net.js:358:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment