Problem: test_heartbeats mocked ZMQ_REP is hacky and fragile

Solution: remove it, it doesn't add much value anyway
This commit is contained in:
Luca Boccassi 2018-05-12 16:19:49 +01:00 committed by Simon Giesecke
parent f218478237
commit ba9274c39a

View File

@ -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 ()
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)
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);