Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
7f9d0e89
Commit
7f9d0e89
authored
Oct 31, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loose assertions on running time in test/bthread_timer_thread_unittest.cpp
parent
16698226
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
bthread_timer_thread_unittest.cpp
test/bthread_timer_thread_unittest.cpp
+1
-4
No files found.
test/bthread_timer_thread_unittest.cpp
View file @
7f9d0e89
...
...
@@ -68,8 +68,7 @@ public:
{
ASSERT_TRUE
(
!
_run_times
.
empty
());
long
diff
=
timespec_diff_us
(
_run_times
[
0
],
expect_run_time
);
EXPECT_GE
(
diff
,
0
);
EXPECT_LE
(
diff
,
kEpsilonUs
);
EXPECT_LE
(
labs
(
diff
),
10000
);
}
void
expect_not_run
()
{
...
...
@@ -89,9 +88,7 @@ private:
const
char
*
_name
;
int
_sleep_ms
;
std
::
vector
<
timespec
>
_run_times
;
static
const
long
kEpsilonUs
;
};
const
long
TimeKeeper
::
kEpsilonUs
=
50000
;
// 50,000 us, 1/20 second.
TEST
(
TimerThreadTest
,
RunTasks
)
{
bthread
::
TimerThread
timer_thread
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment