Commit Graph

800 Commits

Author SHA1 Message Date
Simon Giesecke
e8877f78a9 Problem: zmq_poller_[add/modify] accept invalid events arguments silently
Solution: check and return an error on invalid arguments. Fixes #3088
2018-05-14 14:58:36 +02:00
Simon Giesecke
2cd147e5ff Problem: misleading comment for calling zmq_poller_add with events == 0
Solution: change comment, and add test case for zmq_poller_modify with events == 0
2018-05-14 11:29:24 +02:00
Simon Giesecke
be66eacf5c Problem: test_heartbeats still using plain assertions
Solution: migrate to unity assertions
2018-05-14 10:14:32 +02:00
Luca Boccassi
b331caad06 Problem: ZMTP 3.1 PING Context not implemented
Solution: if a PING message contains a context, echo it back in the
PONG message. In order to do so, create the PONG message when PING
is received and store it in the engine.
After the PING the engine goes straight to encoding and sending, so
there can always be at most one pending PING.
Add tests for various contexts.
2018-05-14 10:14:13 +02:00
Luca Boccassi
ba9274c39a Problem: test_heartbeats mocked ZMQ_REP is hacky and fragile
Solution: remove it, it doesn't add much value anyway
2018-05-14 09:15:38 +02:00
Simon Giesecke
f218478237 Problem: test_heartbeats use no test framework
Solution: migrate to unity
2018-05-14 09:15:38 +02:00
Lionel Flandrin
4eb6786347 Problem: test_radio_dish triggers aliasing errors with some compilers
Solution: refactor the test code to work around aliasing issues
2018-05-13 17:05:05 +02:00
Luca Boccassi
c5b7f4f536 Problem: test_system info output hidden on Solaris
Solution: change the ifdef to always print on any Unix, as they
all have ulimit
2018-05-13 13:19:07 +01:00
Luca Boccassi
510a42c3d5 Problem: test_system fails on Solaris due to lower file limit
Solution: use a different max socket value on Solaris, where the
default limit is 256 instead of 1024
2018-05-13 13:18:08 +01:00
Lionel Flandrin
99412c810d Problem: ZMQ doesn't expose the MULTICAST_LOOP socket option
Solution: add a new ZMQ_MULTICAST_LOOP option for UDP sockets.
2018-05-10 19:24:46 +02:00
Lionel Flandrin
f9c30f3e19 Problem: test helper recv_string_expect_success ignores the flags argument
Solution: pass the flags to zmq_recv
2018-05-10 11:43:47 +02:00
Lionel Flandrin
b0df4be51c Problem: UDP engine does not support IPv6
Solution: Add IPv6 support
2018-05-09 12:06:23 +02:00
Lionel Flandrin
4cd2c2ebf8 Problem: address parsing code is tied to the TCP code
Solution: Factor the code into a different file with a well defined API and add
unit tests.
2018-05-02 18:06:01 +02:00
Luca Boccassi
4a4c6c27e4 Problem: heartbeat tests only cover ROUTER/DEALER
Solution: check more socket type to cover other session managers.
Increase timeout as the test now takes ~12 seconds.
2018-04-28 15:49:54 +01:00
Simon Giesecke
f571c22851 Problem: socket_poller destruction after context shutdown is only tested with a non-thread-safe socket
Solution: test with both thread-safe and non-thread-safe sockets
2018-03-28 11:23:08 +02:00
Simon Giesecke
32c8abb1d8 Problem: regression when zmq_poller_destroy is called after zmq_ctx_term
Solution: Added test case to reproduce, not solving the problem!
2018-03-28 10:53:16 +02:00
Luca Boccassi
6f26a33359 Problem: 4.2.5 is out, we need to restore API changes and 4.3.x
Solution: revert the revert!

Revert "Problem: regression in 4.2.3 went unnoticed, want to release 4.2.5"

This reverts commit 5f17e26fa4.
2018-03-23 19:31:42 +00:00
Luca Boccassi
5f17e26fa4 Problem: regression in 4.2.3 went unnoticed, want to release 4.2.5
Solution: revert DRAFT -> STABLE API transition so that we can do a
bugfix-only 4.2.5 release.
Will be re-reverted once tagged.

Revert "Problem: ZMQ_BINDTODEVICE has met STABLE conditions"

This reverts commit 3cb79f5042.

Revert "Problem: ZMQ_MSG_GSSAPI_* have met STABLE conditions"

This reverts commit 374da4207b.

Revert "Problem: ZMQ_MSG_T_SIZE has met STABLE conditions"

This reverts commit 6411c4a247.

Revert "Problem: docs say STABLE API still in DRAFT"

This reverts commit 9f2f30b7ff.
2018-03-23 11:22:10 +00:00
Luca Boccassi
1c5a63e939 Problem: backward incompatible change to NULL with ZAP
Solution: like for other mechanism, do not enforce strict ZAP protocol
adherence unless the specific socket option is enabled with NULL auth.

Add test to exercise this functionality, and fix ZAP test to set the
socket option when it uses NULL auth.

See: https://github.com/zeromq/pyzmq/pull/1152
2018-03-22 19:27:23 +00:00
Luca Boccassi
e4b3bd8631 Problem: cannot set ZAP_ENFORCE_DOMAIN in testutil's wrappers
Solution: override unused parameter for NULL wrapper
2018-03-22 19:25:42 +00:00
Luca Boccassi
374da4207b Problem: ZMQ_MSG_GSSAPI_* have met STABLE conditions
Solution: move them from DRAFT to STABLE since it's been in a public
release, committed for 6+ months and has not changed.
2018-03-21 16:45:41 +00:00
Simon Giesecke
84a3767d61 Problem: open TODO comment regarding explicit zmq_disconnect/zmq_unbind
Solution: replaced by a comment explaining why the calls are in the test
2018-03-21 16:28:10 +01:00
Simon Giesecke
786a8d48d5 Problem: code duplication in test_reqrep_tcp
Solution: extracted make_connect_address
2018-03-21 15:09:23 +01:00
Simon Giesecke
8372797cc3 Problem: code duplication in test_reqrep_tcp
Solution: extracted bind_loopback
2018-03-21 15:09:22 +01:00
Simon Giesecke
c84c3a525a Problem: test_reqrep_tcp not yet using unity
Solution: migrate to unity
2018-03-21 15:09:19 +01:00
Simon Giesecke
6d89635f9a Problem: test_udp not using unity
Solution: migrate to unity, merge into test_radio_dish, and split up test cases
2018-03-16 17:03:45 +01:00
Simon Giesecke
dc2764f58c Problem: test_last_endpoint not using unity
Solution: migrate to unity
2018-03-16 16:35:31 +01:00
Simon Giesecke
1747cbdcac Problem: test_immediate not using unity
Solution: migrate to unity, and split test cases
2018-03-16 15:46:39 +01:00
Simon Giesecke
6f8b604648 Problem: test_radio_dish not using unity
Solution: migrate to unity, and split test cases
2018-03-16 15:22:14 +01:00
Simon Giesecke
cdc298f567 Problem: bind_loopback_ipv4 not reusable
Solution: Moved bind_loopback_ipv4 to testutil_unity to allow for reuse
2018-03-16 15:21:39 +01:00
Kachanovskiy
eb76ea06bd Fix for #2997 2018-03-16 12:48:00 +01:00
Luca Boccassi
4cb15ec638
Merge pull request #2994 from sigiesec/migrate-to-unity
Migrate further tests to unity, and split up into individual test cases
2018-03-15 16:55:05 +00:00
Simon Giesecke
7bd57ba83b Problem: test case tests multiple aspects
Solution: split test case
2018-03-15 16:43:34 +01:00
Simon Giesecke
3e374d98f1 Problem: test case tests multiple aspects
Solution: split test case
2018-03-15 16:43:33 +01:00
Simon Giesecke
eb0307a9a6 Problem: test case tests multiple aspects
Solution: split test case
2018-03-15 16:43:32 +01:00
Simon Giesecke
10dae6e830 Problem: test_poller not using unity
Solution: migrate to unity, and split test cases
2018-03-15 16:43:30 +01:00
Simon Giesecke
991b2336e4 Problem: test_thread_safe not using unity
Solution: migrate to unity, and split test cases
2018-03-15 16:43:27 +01:00
Simon Giesecke
5d32828bbf Problem: test_reconnect_ivl not using unity
Solution: migrate to unity, and reduce code duplication
2018-03-15 16:43:26 +01:00
Luca Boccassi
e388774737
Merge pull request #2981 from eponsko/master
Problem: no support for ZMTP 3.1 application metadata
2018-03-15 12:57:40 +00:00
Simon Giesecke
1e217ac063 Problem: unity built with unnecessary float but without command line argument support
Solution: add appropriate definitions to build
2018-03-15 11:28:50 +01:00
Simon Giesecke
f92cdf9470 Problem: test_ctx_destroy not using unity, and mixing test cases
Solution: migrate to unit and split up test cases
2018-03-15 10:58:56 +01:00
Simon Giesecke
9553a1f33e Problem: test_connect_resolve not yet using unity
Solution: migrate to unity
2018-03-14 22:40:24 +01:00
Simon Giesecke
6f9459e3fb Migrate tests/test_conflate.cpp to unity 2018-03-14 19:05:19 +01:00
Simon Giesecke
d318c95bc2 Problem: different aspects mixed in one test case
Solution: split up test case
2018-03-14 18:59:36 +01:00
Simon Giesecke
dbcd42c58d Migrate tests/test_client_server.cpp to unity 2018-03-14 18:45:26 +01:00
Simon Giesecke
0114572ce6 Migrate tests/test_bind_src_address.cpp to unity 2018-03-14 18:45:25 +01:00
Simon Giesecke
be33dce68e Migrate tests/test_bind_after_connect_tcp.cpp to unity 2018-03-14 18:45:25 +01:00
Simon Giesecke
631de94563 Problem: test_router_hangover not yet using unity
Solution: migrate to unity
2018-03-14 15:09:13 +01:00
Pontus Sköldström
dd5eec35be Support application metadata through ZMQ_METADATA
Lets the application set per-connection metadata.
Metadata is specified as "X-key:value" and set using zmq_setsockopt, eg:
zmq_setsockopt (s, ZMQ_METADATA, "X-key:value", 11);

The peer can then obtain the metadata from a received message:
char *data = zmq_msg_gets(msg, "X-key");
2018-03-14 12:56:15 +01:00
Simon Giesecke
59157f0e2f Problem: missing guidelines on proper test cleanup
Solution: add guidelines to tests/README.md
2018-03-14 12:26:06 +01:00