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
99ce6d2d
Commit
99ce6d2d
authored
Sep 29, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix UT which is broken by incorrect patch
parent
9740ea9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
bthread_execution_queue_unittest.cpp
test/bthread_execution_queue_unittest.cpp
+1
-1
bthread_unittest.cpp
test/bthread_unittest.cpp
+4
-9
No files found.
test/bthread_execution_queue_unittest.cpp
View file @
99ce6d2d
...
...
@@ -589,7 +589,7 @@ TEST_F(ExecutionQueueTest, random_cancel) {
int64_t
expected
=
0
;
for
(
int
i
=
0
;
i
<
100000
;
++
i
)
{
bthread
::
TaskHandle
h
;
AddTask
t
=
{
0
}
;
AddTask
t
;
t
.
value
=
i
;
t
.
cancel_task
=
false
;
ASSERT_EQ
(
0
,
bthread
::
execution_queue_execute
(
queue_id
,
t
,
NULL
,
&
h
));
...
...
test/bthread_unittest.cpp
View file @
99ce6d2d
...
...
@@ -506,21 +506,16 @@ TEST_F(BthreadTest, too_many_nosignal_threads) {
ASSERT_EQ
(
0
,
bthread_start_urgent
(
&
tid
,
&
attr
,
dummy_thread
,
NULL
));
}
}
}
// namespace
int
main
(
int
argc
,
char
**
argv
)
{
testing
::
InitGoogleTest
(
&
argc
,
argv
);
GFLAGS_NS
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
return
RUN_ALL_TESTS
();
}
void
*
yield_thread
(
void
*
)
{
static
void
*
yield_thread
(
void
*
)
{
bthread_yield
();
return
NULL
;
}
TEST_F
(
test_bthread_suite
,
yield_single_thread
)
{
TEST_F
(
BthreadTest
,
yield_single_thread
)
{
bthread_t
tid
;
ASSERT_EQ
(
0
,
bthread_start_background
(
&
tid
,
NULL
,
yield_thread
,
NULL
));
ASSERT_EQ
(
0
,
bthread_join
(
tid
,
NULL
));
}
}
// namespace
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