maritz / nohm

node.js object relations mapper (orm) for redis
http://maritz.github.io/nohm/
MIT License
500 stars 64 forks source link

When unit tests close redis in after, the following error will be reported. How do I properly close nohm when unit testing? #157

Closed leekeal closed 4 years ago

leekeal commented 4 years ago

console.error node_modules/nohm/tsOut/index.js:144 { message: Error: Connection is closed. at Redis.Object.<anonymous>.Redis.sendCommand (/Users/workspace/yimq/node_modules/ioredis/built/redis/index.js:557:24) at Redis.get (/Users/workspace/yimq/node_modules/ioredis/built/commander.js:123:21) at /Users/workspace/yimq/node_modules/nohm/ts/typed-redis-helper.ts:12:12 at new Promise (<anonymous>) at Object.get (/Users/workspace/yimq/node_modules/nohm/ts/typed-redis-helper.ts:8:10) at Timeout._onTimeout (/Users/workspace/yimq/node_modules/nohm/ts/model.ts:286:33) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7), name: 'Nohm Error' }

Thank you very much.

maritz commented 4 years ago

Just out of curiosity: What was the problem? I don't quite understand what's going on here :)