Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
9e2b337e
Commit
9e2b337e
authored
12 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1960032
by tim.plunkett, alexpott, Berdir: Fixed Random failure in TimerUnitTest.
parent
877047cb
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/tests/Drupal/Tests/Component/Utility/TimerUnitTest.php
+4
-8
4 additions, 8 deletions
core/tests/Drupal/Tests/Component/Utility/TimerUnitTest.php
with
4 additions
and
8 deletions
core/tests/Drupal/Tests/Component/Utility/TimerUnitTest.php
+
4
−
8
View file @
9e2b337e
...
...
@@ -41,17 +41,13 @@ public function testTimer() {
usleep
(
5000
);
$value4
=
Timer
::
read
(
'test'
);
$this
->
assertGreaterThanOrEqual
(
5
,
$value
,
'Timer measured 5 milliseconds of sleeping while running.'
);
$this
->
assertLessThan
(
10
,
$value
,
'Timer measured 5 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
5
,
$value
,
'Timer measured at least 5 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
10
,
$value2
,
'Timer measured 10 milliseconds of sleeping while running.'
);
$this
->
assertLessThan
(
15
,
$value2
,
'Timer measured 10 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
$value
+
5
,
$value2
,
'Timer measured at least 10 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
15
,
$value3
,
'Timer measured 15 milliseconds of sleeping while running.'
);
$this
->
assertLessThan
(
20
,
$value3
,
'Timer measured 15 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
$value2
+
5
,
$value3
,
'Timer measured at least 15 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
20
,
$value4
,
'Timer measured 20 milliseconds of sleeping while running.'
);
$this
->
assertLessThan
(
25
,
$value4
,
'Timer measured 20 milliseconds of sleeping while running.'
);
$this
->
assertGreaterThanOrEqual
(
$value3
+
5
,
$value4
,
'Timer measured at least 20 milliseconds of sleeping while running.'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment