fix(fs#unlink): remove timeout

This is not an `O(1)` operation.
This commit is contained in:
Julien Fontanet 2018-12-13 11:07:28 +01:00
parent 631e8ce52d
commit ece881c02c
2 changed files with 1 additions and 13 deletions

View File

@ -368,7 +368,7 @@ export default class RemoteHandlerAbstract {
ignoreErrors.call(this._unlink(checksumFile(file)))
}
await timeout.call(this._unlink(file).catch(ignoreEnoent), this._timeout)
await this._unlink(file).catch(ignoreEnoent)
}
async writeFile(

View File

@ -111,15 +111,3 @@ describe('rmdir()', () => {
await expect(promise).rejects.toThrowError(TimeoutError)
})
})
describe('unlink()', () => {
it(`throws in case of timeout`, async () => {
const testHandler = new TestHandler({
unlink: () => new Promise(() => {}),
})
const promise = testHandler.unlink('')
jest.advanceTimersByTime(TIMEOUT)
await expect(promise).rejects.toThrowError(TimeoutError)
})
})