diff --git a/scripts/testsetup.js b/scripts/testsetup.js index ccfad7b22..1d5404790 100644 --- a/scripts/testsetup.js +++ b/scripts/testsetup.js @@ -49,11 +49,7 @@ const startFlood = () => { const closeProcesses = () => { floodProcess.on('close', () => { - if (process.env.CI !== 'true') { - // TODO: This leads to test flakiness caused by ENOENT error - // NeDB provides no method to close database connection - fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); - } + fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); }); floodProcess.kill('SIGTERM'); diff --git a/server/.jest/auth.setup.js b/server/.jest/auth.setup.js index 9fbc256e6..d842d0538 100644 --- a/server/.jest/auth.setup.js +++ b/server/.jest/auth.setup.js @@ -11,9 +11,5 @@ process.argv.push('--auth', 'default'); process.argv.push('--assets', 'false'); afterAll(() => { - if (process.env.CI !== 'true') { - // TODO: This leads to test flakiness caused by ENOENT error - // NeDB provides no method to close database connection - fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); - } + fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); }); diff --git a/server/.jest/rtorrent.setup.js b/server/.jest/rtorrent.setup.js index 16de9c0c4..10ea6d758 100644 --- a/server/.jest/rtorrent.setup.js +++ b/server/.jest/rtorrent.setup.js @@ -31,10 +31,6 @@ process.argv.push('--assets', 'false'); afterAll((done) => { process.kill(Number(fs.readFileSync(`${temporaryRuntimeDirectory}/rtorrent.pid`).toString())); - if (process.env.CI !== 'true') { - // TODO: This leads to test flakiness caused by ENOENT error - // NeDB provides no method to close database connection - fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); - } + fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); done(); }); diff --git a/server/.jest/transmission.setup.js b/server/.jest/transmission.setup.js index cbcd9b8c6..1fc36ad7e 100644 --- a/server/.jest/transmission.setup.js +++ b/server/.jest/transmission.setup.js @@ -43,11 +43,7 @@ process.argv.push('--assets', 'false'); afterAll((done) => { transmissionProcess.on('close', () => { - if (process.env.CI !== 'true') { - // TODO: This leads to test flakiness caused by ENOENT error - // NeDB provides no method to close database connection - fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); - } + fs.rmdirSync(temporaryRuntimeDirectory, {recursive: true}); done(); });