Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
cff03dec
Commit
cff03dec
authored
Dec 12, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
De-flake timing-dependent test.
parent
ff0f1535
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
rpc-twoparty-test.c++
c++/src/capnp/rpc-twoparty-test.c++
+11
-8
mega-test.cfg
mega-test.cfg
+6
-6
No files found.
c++/src/capnp/rpc-twoparty-test.c++
View file @
cff03dec
...
...
@@ -244,13 +244,14 @@ TEST(TwoPartyNetwork, Release) {
// no reply). Here we are explicitly trying to catch this bug. This proves tricky, because when
// we drop a reference on the client side, there's no particular way to wait for the release
// message to reach the server except to make a subsequent call and wait for the return -- but
// that would mask the bug. So we wait 10ms...
//
// (We skip this test on Android because the Android emulator is slow enough that it sometimes
// fails.)
// that would mask the bug. So, we wait spin waiting for handleCount to change.
#if !__ANDROID__
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
uint
maxSpins
=
1000
;
while
(
handleCount
>
1
)
{
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
KJ_ASSERT
(
--
maxSpins
>
0
);
}
EXPECT_EQ
(
1
,
handleCount
);
handle2
=
nullptr
;
...
...
@@ -260,9 +261,11 @@ TEST(TwoPartyNetwork, Release) {
promise
=
nullptr
;
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
while
(
handleCount
>
0
)
{
ioContext
.
provider
->
getTimer
().
afterDelay
(
10
*
kj
::
MILLISECONDS
).
wait
(
ioContext
.
waitScope
);
KJ_ASSERT
(
--
maxSpins
>
0
);
}
EXPECT_EQ
(
0
,
handleCount
);
#endif
}
TEST
(
TwoPartyNetwork
,
Abort
)
{
...
...
mega-test.cfg
View file @
cff03dec
linux-gcc-4.9
5952
./super-test.sh tmpdir capnp-gcc-4.9 gcc-4.9
linux-gcc-4.8
5246
./super-test.sh tmpdir capnp-gcc-4.8 gcc-4.8
linux-clang
6039
./super-test.sh tmpdir capnp-clang clang
mac 642
2
./super-test.sh remote beat caffeinate
cygwin
6
770 ./super-test.sh remote Kenton@flashman
exotic 4
192
./super-test.sh tmpdir exotic exotic
linux-gcc-4.9
9081
./super-test.sh tmpdir capnp-gcc-4.9 gcc-4.9
linux-gcc-4.8
8358
./super-test.sh tmpdir capnp-gcc-4.8 gcc-4.8
linux-clang
9165
./super-test.sh tmpdir capnp-clang clang
mac 642
1
./super-test.sh remote beat caffeinate
cygwin
9
770 ./super-test.sh remote Kenton@flashman
exotic 4
216
./super-test.sh tmpdir exotic exotic
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