thiagodp / codeceptjs-dbhelper

📜 Let your CodeceptJS tests talk to databases
MIT License
9 stars 1 forks source link

mssql connections not being cleared #15

Open jkato51 opened 1 year ago

jkato51 commented 1 year ago

The below code is resulting in error when running multiple times. "Global connection already exists."

Feature('Test1'); BeforeSuite( async({ I }) => { await I.connect('conn1', 'mssql:///user:password!@localhost/database'); I.say('Database connection succeeded'); });

Scenario('Test', async ({ I }) => { //... )};

AfterSuite( async( { I }) => { await I.removeConnection('conn1'); });

thiagodp commented 1 year ago

Hello, @jkato51 ! This problem is happening with the code from tediousjs/node-mssql. Maybe some recent update broke the compatibility (e.g. in the connection pool), or there is a bug in their code. This requires a thorough code analysis, but unfortunately I can't do it now. Whether you can help investigating the problem, I'd appreciate a lot. Thank you.