Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
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
libzmq
Commits
ba9274c3
Commit
ba9274c3
authored
May 12, 2018
by
Luca Boccassi
Committed by
Simon Giesecke
May 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: test_heartbeats mocked ZMQ_REP is hacky and fragile
Solution: remove it, it doesn't add much value anyway
parent
f2184782
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
test_heartbeats.cpp
tests/test_heartbeats.cpp
+0
-10
No files found.
tests/test_heartbeats.cpp
View file @
ba9274c3
...
@@ -85,10 +85,6 @@ static void recv_with_retry (raw_socket fd, char *buffer, int bytes)
...
@@ -85,10 +85,6 @@ static void recv_with_retry (raw_socket fd, char *buffer, int bytes)
assert
(
received
<=
bytes
);
assert
(
received
<=
bytes
);
if
(
received
==
bytes
)
if
(
received
==
bytes
)
break
;
break
;
// ZMQ_REP READY message is shorter, check the actual socket type
if
(
received
>=
3
&&
buffer
[
received
-
1
]
==
'P'
&&
buffer
[
received
-
2
]
==
'E'
&&
buffer
[
received
-
3
]
==
'R'
)
break
;
}
}
}
}
...
@@ -358,11 +354,6 @@ void test_heartbeat_timeout_router ()
...
@@ -358,11 +354,6 @@ void test_heartbeat_timeout_router ()
test_heartbeat_timeout
(
ZMQ_ROUTER
);
test_heartbeat_timeout
(
ZMQ_ROUTER
);
}
}
void
test_heartbeat_timeout_rep
()
{
test_heartbeat_timeout
(
ZMQ_REP
);
}
#define DEFINE_TESTS(first, second, first_define, second_define) \
#define DEFINE_TESTS(first, second, first_define, second_define) \
void test_heartbeat_ttl_##first##_##second () \
void test_heartbeat_ttl_##first##_##second () \
{ \
{ \
...
@@ -390,7 +381,6 @@ int main (void)
...
@@ -390,7 +381,6 @@ int main (void)
UNITY_BEGIN
();
UNITY_BEGIN
();
RUN_TEST
(
test_heartbeat_timeout_router
);
RUN_TEST
(
test_heartbeat_timeout_router
);
RUN_TEST
(
test_heartbeat_timeout_rep
);
RUN_TEST
(
test_heartbeat_ttl_dealer_router
);
RUN_TEST
(
test_heartbeat_ttl_dealer_router
);
RUN_TEST
(
test_heartbeat_ttl_req_rep
);
RUN_TEST
(
test_heartbeat_ttl_req_rep
);
...
...
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