@@ -361,13 +361,13 @@ public function testExtendLock() {
361361
362362 // We should have one lock for that file with 15 minutes ETA
363363 $ this ->assertCount (1 , $ locks );
364- $ this ->assertEquals (15 * 60 , $ locks [0 ]->getEta ());
364+ $ this ->assertEqualsWithDelta (15 * 60 , $ locks [0 ]->getEta (), 2 , ' Initial lock ETA should be approximately 15 minutes ' );
365365
366366 // going to the future we see the ETA to be 5 minutes
367367 $ this ->toTheFuture (10 * 60 );
368368 $ locks = $ this ->lockManager ->getLocks ($ file ->getId ());
369369 $ this ->assertCount (1 , $ locks );
370- $ this ->assertEquals (5 * 60 , $ locks [0 ]->getEta ());
370+ $ this ->assertEqualsWithDelta (5 * 60 , $ locks [0 ]->getEta (), 2 , ' After 10 minutes, ETA should be approximately 5 minutes ' );
371371 $ id = $ locks [0 ]->getId ();
372372
373373 // Extend the lock (lock again)
@@ -376,7 +376,7 @@ public function testExtendLock() {
376376 // The lock should only be extended, so same ID but fresh ETA
377377 $ locks = $ this ->lockManager ->getLocks ($ file ->getId ());
378378 $ this ->assertCount (1 , $ locks );
379- $ this ->assertEquals (15 * 60 , $ locks [0 ]->getEta ());
379+ $ this ->assertEqualsWithDelta (15 * 60 , $ locks [0 ]->getEta (), 2 , ' Extended lock ETA should be approximately 15 minutes ' );
380380 $ this ->assertEquals ($ id , $ locks [0 ]->getId ());
381381 }
382382
0 commit comments