mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
When restarting test server with resetting the database, don't forget to close it (#923)
This commit is contained in:
parent
2140900d58
commit
3405ce902e
@ -67,6 +67,9 @@ export class TestServerMerged extends EventEmitter implements IMochaServer {
|
|||||||
this._starts++;
|
this._starts++;
|
||||||
const workerIdText = process.env.MOCHA_WORKER_ID || '0';
|
const workerIdText = process.env.MOCHA_WORKER_ID || '0';
|
||||||
if (reset) {
|
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) {
|
if (process.env.TESTDIR) {
|
||||||
this.testDir = path.join(process.env.TESTDIR, workerIdText);
|
this.testDir = path.join(process.env.TESTDIR, workerIdText);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user