You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a jest test (typescript), i am connecting to a mariadb using a pool. The database querys are working fine.
After finishing the tests, the mariadb connection is ended, but still there is an Error.
Awaiting for the pool to end is not ending the pool completely, there seems to be still a process running in the background.
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From test/ddl.view.test.ts.
at Function.pluginHandler (../.yarn/cache/mariadb-npm-3.1.0-1d9a7a9506-d906ffc915.zip/node_modules/mariadb/lib/cmd/handshake/handshake.js:205:22)
at Handshake.dispatchAuthSwitchRequest (../.yarn/cache/mariadb-npm-3.1.0-1d9a7a9506-d906ffc915.zip/node_modules/mariadb/lib/cmd/handshake/handshake.js:168:31)
at Handshake.handshakeResult (../.yarn/cache/mariadb-npm-3.1.0-1d9a7a9506-d906ffc915.zip/node_modules/mariadb/lib/cmd/handshake/handshake.js:93:14)
at PacketInputStream.receivePacketBasic (../.yarn/cache/mariadb-npm-3.1.0-1d9a7a9506-d906ffc915.zip/node_modules/mariadb/lib/io/packet-input-stream.js:80:9)
at PacketInputStream.onData (../.yarn/cache/mariadb-npm-3.1.0-1d9a7a9506-d906ffc915.zip/node_modules/mariadb/lib/io/packet-input-stream.js:130:20)
Some race condition can make that possible : closing pool while pool was in the middle of creating a connection. That is not a problem usually because the connection being created will automatically beeing close a few nanoseconds after, but current implementation for authentication import file, making the error listed above.
When running a jest test (typescript), i am connecting to a mariadb using a pool. The database querys are working fine.
After finishing the tests, the mariadb connection is ended, but still there is an Error.
Awaiting for the pool to end is not ending the pool completely, there seems to be still a process running in the background.
Code used for closing the pool:
What fixed the problem temporarily:
The text was updated successfully, but these errors were encountered: