Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc568c0

Browse filesBrowse files
greg0irefabpot
authored andcommitted
[Lock] Pedantic improvements for lock
1 parent f82beb5 commit dc568c0
Copy full SHA for dc568c0

File tree

Expand file treeCollapse file tree

3 files changed

+8
-7
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-7
lines changed

‎src/Symfony/Component/Lock/StoreInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/StoreInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function waitAndSave(Key $key);
4343
*
4444
* If the store does not support this feature it should throw a NotSupportedException.
4545
*
46-
* @param float $ttl amount of second to keep the lock in the store
46+
* @param float $ttl amount of seconds to keep the lock in the store
4747
*
4848
* @throws LockConflictedException
4949
* @throws NotSupportedException

‎src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract protected function getStore();
3636
*/
3737
public function testBlockingLocks()
3838
{
39-
// Amount a microsecond used to order async actions
39+
// Amount of microseconds we should wait without slowing things down too much
4040
$clockDelay = 50000;
4141

4242
if (\PHP_VERSION_ID < 50600 || \defined('HHVM_VERSION_ID')) {

‎src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
trait ExpiringStoreTestTrait
2121
{
2222
/**
23-
* Amount a microsecond used to order async actions.
23+
* Amount of microseconds used as a delay to test expiration. Should be
24+
* small enough not to slow the test suite too much, and high enough not to
25+
* fail because of race conditions.
2426
*
2527
* @return int
2628
*/
@@ -34,7 +36,7 @@ abstract protected function getStore();
3436
/**
3537
* Tests the store automatically delete the key when it expire.
3638
*
37-
* This test is time sensible: the $clockDelay could be adjust.
39+
* This test is time-sensitive: the $clockDelay could be adjusted.
3840
*/
3941
public function testExpiration()
4042
{
@@ -71,14 +73,13 @@ public function testAbortAfterExpiration()
7173
/**
7274
* Tests the refresh can push the limits to the expiration.
7375
*
74-
* This test is time sensible: the $clockDelay could be adjust.
76+
* This test is time-sensitive: the $clockDelay could be adjusted.
7577
*/
7678
public function testRefreshLock()
7779
{
78-
// Amount a microsecond used to order async actions
80+
// Amount of microseconds we should wait without slowing things down too much
7981
$clockDelay = $this->getClockDelay();
8082

81-
// Amount a microsecond used to order async actions
8283
$key = new Key(uniqid(__METHOD__, true));
8384

8485
/** @var StoreInterface $store */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.