diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2014-08-19 12:20:07 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2014-08-19 12:20:07 +0200 |
| commit | e9347ec8395d66a5e6220a14f186b29a012e15ab (patch) | |
| tree | afceb2d2db23d714a56d3322d0ebcd458ce7b67c | |
| parent | dc87e581c1a0ef5d979b342d7abd7ef60318472a (diff) | |
| parent | da3ddaf676827b1377306f7a89079b96d1bcc253 (diff) | |
| download | forums-e9347ec8395d66a5e6220a14f186b29a012e15ab.tar forums-e9347ec8395d66a5e6220a14f186b29a012e15ab.tar.gz forums-e9347ec8395d66a5e6220a14f186b29a012e15ab.tar.bz2 forums-e9347ec8395d66a5e6220a14f186b29a012e15ab.tar.xz forums-e9347ec8395d66a5e6220a14f186b29a012e15ab.zip | |
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus:
[ticket/12996] Fix reliability issue in flock test.
| -rw-r--r-- | tests/lock/flock_test.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/lock/flock_test.php b/tests/lock/flock_test.php index 0ff38b6cc8..554b7e57f4 100644 --- a/tests/lock/flock_test.php +++ b/tests/lock/flock_test.php @@ -83,9 +83,9 @@ class phpbb_lock_flock_test extends phpbb_test_case sleep(1); $lock = new \phpbb\lock\flock($path); - $start = time(); + $start = microtime(true); $ok = $lock->acquire(); - $delta = time() - $start; + $delta = microtime(true) - $start; $this->assertTrue($ok); $this->assertTrue($lock->owns_lock()); $this->assertGreaterThan(0.5, $delta, 'First lock acquired too soon'); @@ -94,9 +94,9 @@ class phpbb_lock_flock_test extends phpbb_test_case $this->assertFalse($lock->owns_lock()); // acquire again, this should be instantaneous - $start = time(); + $start = microtime(true); $ok = $lock->acquire(); - $delta = time() - $start; + $delta = microtime(true) - $start; $this->assertTrue($ok); $this->assertTrue($lock->owns_lock()); $this->assertLessThan(0.1, $delta, 'Second lock not acquired instantaneously'); |
