Closed b1ek closed 1 year ago
We're running these tests using GitHub Actions quite frequently and those work using yarn test
without failures. So it might be on your end. Does this happen for other dialects as well? See this file for the other dialects used in CI and the required env variables for them; https://github.com/sequelize/cli/blob/main/.github/workflows/ci.yml
I just checked them, none of them worked for me.
As of now i checked these platforms:
node:10
dockerNone of them are running tests at all. I am running tests with this:
$ export DIALECT=sqlite
$ yarn test
Other dialects didn't work too. I followed the scenario step-by-step in a clean chroot so i just dont imagine how is this working in the CI but not on my machine.
I'm using a clean GitHub Codespaces and ran yarn install && yarn test
and then it works fine for sqlite tests. It is using Node 20.4.0 but using Node 18.16.1 also works for me.
Does sequelize itself give a table name back when debugging? https://github.com/sequelize/cli/blob/6bfc4dd3b2c1d9b806b9e54afdbd83322f4aa24b/test/support/helpers.js#L196-L203
I am unsure what exactly are you asking, but running it with DEBUG=*
may show better picture of what happened:
mocha:runner run(): starting +22ms
mocha:runner run(): emitting start +0ms
mocha:runner run(): emitted start +0ms
mocha:runner runSuite(): running +1ms
mocha:runner _addEventListener(): adding for event error; 0 current listeners +0ms
mocha:runner runSuite(): running [SQLITE] lib/sequelize db:create +1ms
mocha:runner runSuite(): bailing +0ms
mocha:runner runSuite(): running [SQLITE] lib/sequelize db:drop +0ms
mocha:runner runSuite(): bailing +0ms
mocha:runner runSuite(): running [SQLITE] lib/sequelize db:migrate (JSON) +0ms
[SQLITE] lib/sequelize db:migrate (JSON)
mocha:runner _addEventListener(): adding for event error; 0 current listeners +1ms
sequelize:connection:sqlite connection acquired default +0ms
sequelize:sql:sqlite Executing (default): SELECT name FROM `sqlite_master` WHERE type='table' and name!='sqlite_sequence'; +0ms
sequelize:sql:sqlite Executed (default): SELECT name FROM `sqlite_master` WHERE type='table' and name!='sqlite_sequence'; +0ms
sequelize:sql:sqlite Executing (default): PRAGMA foreign_keys = OFF +4ms
sequelize:sql:sqlite Executed (default): PRAGMA foreign_keys = OFF +0ms
sequelize:sql:sqlite Executing (default): PRAGMA foreign_keys = ON +1ms
sequelize:sql:sqlite Executed (default): PRAGMA foreign_keys = ON +0ms
sequelize:pool pool created with max/min: 5/0, no replication +267ms
mocha:runner _addEventListener(): adding for event error; 0 current listeners +8ms
sequelize:connection:sqlite connection acquired default +489ms
sequelize:sql:sqlite Executing (default): SELECT name FROM `sqlite_master` WHERE type='table' and name!='sqlite_sequence'; +484ms
sequelize:sql:sqlite Executed (default): SELECT name FROM `sqlite_master` WHERE type='table' and name!='sqlite_sequence'; +0ms
mocha:runner trapped unhandled rejection from (probably) user code; re-emitting on process +484ms
mocha:runner _addEventListener(): adding for event unhandledRejection; 0 current listeners +0ms
mocha:runner total number of failures: 1 +30s
The tests for the main branch seem to run smoothly, i think that my code somehow affected the tests behaviour. Thanks for the help, though
Im working on a new feature for this and i want to add tests for it, but even running tests with no modifications produces this kind of thing:
Is this a common thing to happen? I am unsure if that's just a platform thing or the code thing. I debugged it so far to
test/db/migrate.test.js:289
, but that block of code has been intact for 8 years, there's no way it could go unfixed for that longI searched the issue tracker for this, but didn't have any luck