When restarting test server with resetting the database, don't forget to close it (#923)

pull/912/head
Dmitry 1 month ago committed by GitHub
parent 2140900d58
commit 3405ce902e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -67,6 +67,9 @@ export class TestServerMerged extends EventEmitter implements IMochaServer {
this._starts++;
const workerIdText = process.env.MOCHA_WORKER_ID || '0';
if (reset) {
// Make sure this test server doesn't keep using the DB that's about to disappear.
await this.closeDatabase();
if (process.env.TESTDIR) {
this.testDir = path.join(process.env.TESTDIR, workerIdText);
} else {

Loading…
Cancel
Save