From 241b073fd346a0c07df348b9d63373b10f5af3dd Mon Sep 17 00:00:00 2001 From: jean-airoldie <25088801+jean-airoldie@users.noreply.github.com> Date: Sat, 22 Jun 2019 14:48:18 -0400 Subject: [PATCH] Problem: missing heartbeat test for draft sockets Solution: Add heartbeat tests for CLIENT, SERVER, GATHER and SCATTER socket types. RADIO and DISH tests won't be added since heartbeating is not yet supported. --- tests/test_heartbeats.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_heartbeats.cpp b/tests/test_heartbeats.cpp index c7033c13..2f05e8a7 100644 --- a/tests/test_heartbeats.cpp +++ b/tests/test_heartbeats.cpp @@ -368,6 +368,11 @@ DEFINE_TESTS (pull, push, ZMQ_PULL, ZMQ_PUSH) DEFINE_TESTS (sub, pub, ZMQ_SUB, ZMQ_PUB) DEFINE_TESTS (pair, pair, ZMQ_PAIR, ZMQ_PAIR) +#ifdef ZMQ_BUILD_DRAFT_API +DEFINE_TESTS (gather, scatter, ZMQ_GATHER, ZMQ_SCATTER) +DEFINE_TESTS (client, server, ZMQ_CLIENT, ZMQ_SERVER) +#endif + const int deciseconds_per_millisecond = 100; const int heartbeat_ttl_max = (UINT16_MAX + 1) * deciseconds_per_millisecond - 1; @@ -441,5 +446,16 @@ int main (void) RUN_TEST (test_heartbeat_notimeout_sub_pub_with_curve); RUN_TEST (test_heartbeat_notimeout_pair_pair_with_curve); +#ifdef ZMQ_BUILD_DRAFT_API + RUN_TEST (test_heartbeat_ttl_client_server); + RUN_TEST (test_heartbeat_ttl_gather_scatter); + + RUN_TEST (test_heartbeat_notimeout_client_server); + RUN_TEST (test_heartbeat_notimeout_gather_scatter); + + RUN_TEST (test_heartbeat_notimeout_client_server_with_curve); + RUN_TEST (test_heartbeat_notimeout_gather_scatter_with_curve); +#endif + return UNITY_END (); }