mirror of
https://github.com/zoriya/flood.git
synced 2026-06-02 19:11:14 +00:00
server: tests: remove db cleanup workaround
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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});
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user