fix: relax lock settings (#5280)

This commit is contained in:
Pim 2019-03-19 14:54:23 +01:00 committed by Sébastien Chopin
parent 2eb1965357
commit 65a431d68c
2 changed files with 4 additions and 4 deletions

View File

@ -8,8 +8,8 @@ import onExit from 'signal-exit'
export const lockPaths = new Set()
export const defaultLockOptions = {
stale: 15000,
onCompromised: err => consola.fatal(err)
stale: 30000,
onCompromised: err => consola.warn(err)
}
export function getLockOptions(options) {

View File

@ -18,9 +18,9 @@ describe('util: locking', () => {
beforeEach(() => jest.resetAllMocks())
beforeEach(() => lockPaths.clear())
test('onCompromised lock is fatal error by default', () => {
test('onCompromised lock is warn error by default', () => {
defaultLockOptions.onCompromised()
expect(consola.fatal).toHaveBeenCalledTimes(1)
expect(consola.warn).toHaveBeenCalledTimes(1)
})
test('can override default options', () => {