@@ -40,7 +40,7 @@ protected function setUp(): void
4040 ->setMethods (array_merge (get_class_methods (ClientInterface::class), ['set ' , 'eval ' ]))
4141 ->getMock ();
4242
43- $ this ->mutex = new PredisMutex ([$ this ->client ], 'test ' );
43+ $ this ->mutex = new PredisMutex ([$ this ->client ], 'test ' , 2.5 );
4444
4545 $ this ->logger = $ this ->createMock (LoggerInterface::class);
4646 $ this ->mutex ->setLogger ($ this ->logger );
@@ -53,7 +53,7 @@ public function testAddFailsToSetKey()
5353 {
5454 $ this ->client ->expects ($ this ->atLeastOnce ())
5555 ->method ('set ' )
56- ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 4000 , 'NX ' )
56+ ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 3500 , 'NX ' )
5757 ->willReturn (null );
5858
5959 $ this ->logger ->expects ($ this ->never ())
@@ -75,7 +75,7 @@ public function testAddErrors()
7575 {
7676 $ this ->client ->expects ($ this ->atLeastOnce ())
7777 ->method ('set ' )
78- ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 4000 , 'NX ' )
78+ ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 3500 , 'NX ' )
7979 ->willThrowException ($ this ->createMock (PredisException::class));
8080
8181 $ this ->logger ->expects ($ this ->once ())
@@ -95,7 +95,7 @@ public function testWorksNormally()
9595 {
9696 $ this ->client ->expects ($ this ->atLeastOnce ())
9797 ->method ('set ' )
98- ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 4000 , 'NX ' )
98+ ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 3500 , 'NX ' )
9999 ->willReturnSelf ();
100100
101101 $ this ->client ->expects ($ this ->once ())
@@ -119,7 +119,7 @@ public function testEvalScriptFails()
119119 {
120120 $ this ->client ->expects ($ this ->atLeastOnce ())
121121 ->method ('set ' )
122- ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 4000 , 'NX ' )
122+ ->with ('lock_test ' , $ this ->isType ('string ' ), 'PX ' , 3500 , 'NX ' )
123123 ->willReturnSelf ();
124124
125125 $ this ->client ->expects ($ this ->once ())
0 commit comments