@@ -43,7 +43,10 @@ test.group('Lock', () => {
4343 }
4444 }
4545
46- const lock = new Lock ( 'foo' , new FakeStore ( ) , { retry : { attempts : 5 } , logger : noopLogger ( ) } )
46+ const lock = new Lock ( 'foo' , new FakeStore ( ) , {
47+ retry : { attempts : 5 , delay : 10 } ,
48+ logger : noopLogger ( ) ,
49+ } )
4750
4851 // @ts -ignore
4952 await assert . rejects ( ( ) => lock . acquire ( ) , E_LOCK_TIMEOUT . message )
@@ -59,15 +62,16 @@ test.group('Lock', () => {
5962
6063 const start = Date . now ( )
6164 const lock = new Lock ( 'foo' , new FakeStore ( ) , {
62- retry : { attempts : 5 , delay : 100 } ,
65+ retry : { attempts : 5 , delay : 50 } ,
6366 logger : noopLogger ( ) ,
6467 } )
6568
6669 // @ts -ignore
6770 await assert . rejects ( ( ) => lock . acquire ( ) , E_LOCK_TIMEOUT . message )
71+
6872 const elapsed = Date . now ( ) - start
69- assert . isAbove ( elapsed , 400 )
70- assert . isBelow ( elapsed , 600 )
73+ assert . isAbove ( elapsed , 199 )
74+ assert . isBelow ( elapsed , 300 )
7175 } )
7276
7377 test ( 'respect timeout when acquiring' , async ( { assert } ) => {
0 commit comments