fix(fs#unlink): remove timeout
This is not an `O(1)` operation.
This commit is contained in:
parent
631e8ce52d
commit
ece881c02c
@ -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(
|
||||
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user