-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Description
What are you doing?
I have a suite of mocha tests that sequelize.close() in the after hook. These tests run to completion in 5.8.8. In 5.8.9, they hang.
@sushantdhiman: I'm guessing this is a result of dcf079b#diff-b9cfc7f2cdf78a7f4b91a753d10865a2L43
To Reproduce
Create a new directory, install modules:
$ mkdir foo && cd foo
$ npm i sequelize mysql2 mocha
Create a simple mocha test file, a.js:
const Sequelize = require('sequelize');
sequelize = new Sequelize('tendai_test', 'root', null, {dialect: 'mysql'});
after(async () => await sequelize.close());
describe(__filename, () => it('noop test', async () => await sequelize.query('DO 0')));
What do you expect to happen?
Running the test should complete:
$ mocha a.js
Executing (default): DO 0
/Users/kieffer/foo/a.js
✓ noop test
1 passing (54ms)
$ # (test finishes)
What is actually happening?
$ mocha a.js
Executing (default): DO 0
/Users/kieffer/foo/a.js
✓ noop test
1 passing (54ms)
(test hangs until mocha times out)
As noted, if you downgrade to sequelize 5.8.8, the problem goes away.
Environment
Dialect library version: mysql1.6.5
Database version: mysql Ver 14.14 Distrib 5.7.23, for osx10.13 (x86_64) using EditLine wrapper
Sequelize version: 5.8.9
Node Version: happens in both node 8 and 10
OS: MacOS 10.13.6
Tested with latest release:
- No
- Yes, specify that version: 5.8.9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels