Simon Giesecke
88bea4fd73
Problem: tests without test framework
...
Solution: migrate to unity
2018-12-25 13:50:31 +01:00
Simon Giesecke
affe77280c
Improved test assertion message
2018-12-16 12:28:42 -05:00
Simon Giesecke
00f4bd05be
Problem: tests without test framework
...
Solution: migrate to unity
2018-12-16 12:28:42 -05:00
Simon Giesecke
4a48184032
Problem: tests without test framework
...
Solution: migrate to unity
2018-12-10 07:01:06 -05:00
Simon Giesecke
a8b2e5a617
Problem: tests without test framework
...
Solution: migrate to unity
2018-12-09 07:36:39 -05:00
Luca Boccassi
f1dd84c11f
Problem: zmq_proxy STATISTICS eligible for stable
...
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
35c6985e68
Problem: zmq_stopwatch_intermediate is eligible for STABLE
...
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
22c3ecc458
Problem: some context options have no getter
...
Solution: add one so that class-based bindings can easily use them
2018-11-18 13:23:38 +00:00
Luca Boccassi
c347aef794
Problem: new DRAFT monitoring events are eligible for STABLE
...
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
0e01c27de5
Problem: test_router_notify cannot be ran in parallel
...
Solution: do not bind to an hard-coded port, use a wildcard.
2018-11-09 16:56:00 +00:00
Luca Boccassi
828812fa72
Problem: test_app_meta cannot be ran in parallel
...
Solution: do not bind to an hard-coded port, use a wildcard.
2018-11-09 16:46:48 +00:00
Luca Boccassi
ffd99fbaf5
Problem: GNU/Hurd does not implement getsockname for ipc
...
Solution: skip tests that use ipc://* as it's impossible to get the
address back for the client
2018-11-05 10:59:12 +00:00
Luca Boccassi
205573f1a3
Problem: typo in RUN_TEST macro breaks debian/kfreebsd build
...
Solution: fix it
2018-11-04 18:12:18 +00:00
Luca Boccassi
1a5937750c
Problem: test_connect_delay_tipc randomly fails
...
Solution: use a monitor to wait for a disconnect instead of a sleep,
and retry to send a message until it fails since the state machine
might be delayed due to the I/O thread being pre-empted on busy
systems.
Also set a receive timeout to avoid random hangs.
Fixes #3124
2018-09-29 22:39:36 +01:00
Francesco Montorsi
4f49e7420b
Remove race condition from XPUB/SUB test in test_blocking()
2018-09-21 11:19:50 +02:00
Francesco Montorsi
4b399b51ce
change test_hwm_pubsub to use XPUB and wait for subscription before start to sending messages out
2018-09-20 20:42:03 +02:00
Luca Boccassi
df218af3bd
Problem: test_proxy_hwm expects wrong number of msgs
...
Solution: allow for a range between the minimum and maximum expected.
With 2 queues, that's between 20 and 40 messages depending on the
scheduling of the 3 threads involved.
2018-09-16 21:20:10 +01:00
Luca Boccassi
e651babd85
Problem: test_proxy_hwm uses an bool across threads
...
Solution: use atomics to avoid issues on non-x86 architectures
2018-09-16 21:18:52 +01:00
Francesco Montorsi
72418e9dd0
Improve test reliability by: a) using XPUB in place of PUB to ensure we start publishing only after 1st subscriber has joined; b) accept both 2*HWM, 3*HWM and 4*HWM as TX/RX count of messages
2018-09-16 21:55:59 +02:00
Francesco Montorsi
eb3e63e22f
Hwm tests and docs ( #3242 )
...
Add new HWM tests and more detailed documentation
2018-09-13 22:14:06 +01:00
Christoph Schulz
a21228b664
Conform to cmakelint --filter=-linelength
...
- Lowercase all commands
- Unify indent to 2 spaces
- Remove spaces around brackets
- Remove repitition of condition in else(...) and endif(...)
Note: (re-)running CMake did not change the content of the generated files
2018-09-10 00:12:07 +02:00
Simon Giesecke
1734a64d62
Revert "Problem: test_proxy not yet using unity"
...
This reverts commit fd27324ec3
.
2018-08-24 09:49:41 +02:00
Simon Giesecke
430b97fc73
Problem: test_use_fd not yet using unity
...
Solution: migrate to unity
2018-08-23 18:03:16 +02:00
Simon Giesecke
d668925bca
Problem: extensive duplication between test_use_fd_tcp and test_use_fd_ipc
...
Solution: merge into a single test_use_fd and reduce code duplication by extracting common functions
2018-08-23 18:00:52 +02:00
Simon Giesecke
929d295e01
Problem: test_timers not yet using unity
...
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
980791d182
Problem: test_stream_timeout not yet using unity
...
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
f01682292c
Problem: test_stream_disconnect not yet using unity
...
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
309fe2e6fd
Problem: test_router_mandatory_hwm not yet using unity
...
Solution: migrate to unity
2018-08-23 18:00:51 +02:00
Simon Giesecke
fd27324ec3
Problem: test_proxy not yet using unity
...
Solution: migrate to unity
2018-08-23 18:00:50 +02:00
Simon Giesecke
1a55100dbe
Problem: test_xpub_verbose is not using testutil_unity
...
Solution: use utilities from testutil_unity, reduce duplication
2018-08-22 11:51:11 +02:00
Simon Giesecke
2334090732
Problem: test_stream not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
7ad0ff5e9a
Problem: test_stream_empty not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
7b39d2cb2a
Problem: test_unbind_wildcard not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
c66288a882
Problem: duplicate code
...
Solution: extracted into common method
2018-08-22 11:51:10 +02:00
Simon Giesecke
713f075fec
Problem: test_xpub_manual not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
Simon Giesecke
407bd3b1b2
Problem: test_spec_pushpull not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
261dd1f92c
Problem: test_ancillarries not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
3d2db5d8d5
Problem: test_capabilities not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
dc29361ef4
Problem: test_req_correlate not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:09 +02:00
Simon Giesecke
244ba77ebc
Problem: test_base85 not yet using unity
...
Solution: migrate to unity
2018-08-22 11:51:08 +02:00
Simon Giesecke
fce1838545
Problem: test_pair_tcp not yet using unity
...
Solution: migrate to unity
2018-08-20 11:13:12 +02:00
Simon Giesecke
8328208e60
Problem: inconsistent _out_pipes when using the same routing id without ZMQ_ROUTER_HANDOVER
...
Solution: added test case, do not erase existing without ZMQ_ROUTER_HANDOVER
2018-08-17 12:50:59 +02:00
Simon Giesecke
e07a6a69ad
Problem: test_spec_router not yet using unity
...
Solution: migrate to unity
2018-08-17 10:19:00 +02:00
Simon Giesecke
ab22aeb83e
Problem: test_setsockopt not yet using unity
...
Solution: migrate to unity
2018-08-17 10:19:00 +02:00
Simon Giesecke
30b9e5a10b
Problem: test_connect_rid not yet using unity
...
Solution: migrate to unity
2018-08-17 10:19:00 +02:00
Simon Giesecke
0fc2f0f073
Problem: test_term_endpoint not yet using unity
...
Solution: migrate to unity
2018-08-17 10:19:00 +02:00
Simon Giesecke
dce77fda68
Problem: test_filter_ipc not yet using unity
...
Solution: migrate to unity
2018-08-16 18:34:55 +02:00
Luca Boccassi
fe82c643ed
Merge pull request #3220 from sigiesec/code-improvements
...
Various refactorings
2018-08-16 16:29:17 +01:00
Simon Giesecke
987e75b887
Problem: test program test_unbind_inproc is redundant, the same is already tested in test_inproc_connect
...
Solution: remove test_unbind_inproc
2018-08-16 12:37:06 +02:00
Simon Giesecke
f6a3ebde99
Problem: test not using unity assertions and test utils
...
Solution: Migrate to unity assertions and test utils
2018-08-16 11:55:07 +02:00
Simon Giesecke
6824c167ad
Merge pull request #3217 from WenbinHou/patch-1
...
Update unittests/CMakeLists.txt: use ZeroMQ_SOURCE_DIR, ZeroMQ_BINARY_DIR
2018-08-16 11:15:44 +02:00
Wenbin Hou
0507ae877d
Update tests/CMakeLists.txt: use ZeroMQ_SOURCE_DIR, ZeroMQ_BINARY_DIR
...
Use ZeroMQ_SOURCE_DIR, ZeroMQ_BINARY_DIR instead of CMAKE_SOURCE_DIR, CMAKE_BINARY_DIR in tests/CMakeLists.txt
Similar reason to change unittests/CMakeLists.txt
2018-08-16 13:17:44 +08:00
Simon Giesecke
c546045d8c
Problem: test_connect_delay_tipc not yet using unity
...
Solution: started migration to unity (run test cases separately)
2018-08-15 18:35:17 +02:00
Szekely Gyorgy
2cdad3d0ce
Add ZMQ_ROUTER_NOTIFY draft socket option ( #3213 )
...
* Add ZMQ_ROUTER_NOTIFY draft socket option
2018-08-15 08:54:08 +01:00
Simon Giesecke
062b510b5d
Problem: test case test_probe_router_router does not receive auto-generated routing id
...
Solution: add receive call for routing id
2018-08-13 13:26:50 +02:00
Simon Giesecke
d78152bf83
Problem: no test case for ZMQ_PROBE_ROUTER on ZMQ_DEALER socket
...
Solution: add test case
2018-08-10 17:30:23 +02:00
Simon Giesecke
d9e5ba671b
Problem: test_probe_router not yet using unity
...
Solution: migrate to unity/testutil_unity
2018-08-10 17:30:00 +02:00
Michael Vilim
8a16fef3cc
Problem: ZMQ_CONNECT_ROUTING_ID can be assigned to incoming socket connection (Issue #3191 )
...
Solution: Add an identifier parameter for local attach to zmq::socket_base_t::attach_pipe
2018-07-26 18:26:35 -05:00
Luca Boccassi
d70714e877
Problem: can't process ZMTP 3.1 cancel/subscribe commands
...
Solution: add some msg helpers to parse commands, and check for
subscribe or cancel commands and process them accordingly in the xpub
and xsub classes.
2018-06-23 17:16:10 +01:00
Simon Giesecke
fa8bc17ef3
Problem: CMake error on Win32 with DRAFTS disabled
...
Solution: guard CMake statement properly
2018-06-01 18:20:11 +02:00
Simon Giesecke
779d120fa3
Problem: tests do not follow naming style
...
Solution: apply naming style
2018-05-27 13:24:08 +02:00
Simon Giesecke
8b030a9256
Problem: no tests for corner cases of setsockopt ZMQ_HEARTBEAT_TTL
...
Solution: added tests
2018-05-25 15:13:07 +02:00
Simon Giesecke
7b686900f9
Problem: VS2008 build fails due to unavailable stdint.h
...
Solution: specify not to use stdint.h for VS<=2008, fixes #3025
2018-05-24 15:56:08 +02:00
Simon Giesecke
1e89a51734
Problem: broken indentation
...
Solution: fix indentation
2018-05-24 15:56:08 +02:00
Luca Boccassi
f3e7911dd6
Merge pull request #3127 from sigiesec/integrate-wepoll
...
Support epoll polling under Windows with wepoll
2018-05-23 21:15:56 +01:00
Simon Giesecke
64f2b100da
Problem: test_context_socket is not thread-safe
...
Solution: use regular zmq_socket instead in thread functions
2018-05-23 17:32:27 +02:00
Simon Giesecke
9df851225a
Problem: test_radio_dish takes time near timeout
...
Solution: increase timeout
2018-05-23 16:31:05 +02:00
Simon Giesecke
945c79de67
Problem: test cases setting ZMQ_MULTICAST_LOOP to false fail on Windows
...
Solution: disable test cases
2018-05-23 16:26:52 +02:00
Simon Giesecke
57ef8e2e3e
Problem: custom test ignore
...
Solution: use unity mechanism for ignoring with message
2018-05-23 16:26:52 +02:00
Simon Giesecke
2bdf86d6c2
Problem: timeout on test_many_sockets with epoll
...
Solution: increase timeout, remove timeout settings for unsupported poll poller
2018-05-23 16:26:52 +02:00
Simon Giesecke
275a89ac3c
Problem: test_many_sockets does not show number of sockets that could be created
...
Solution: add diagnostic output
2018-05-23 16:25:08 +02:00
Simon Giesecke
bd129e78ff
Problem: test assertion unnecessary complex
...
Solution: use TEST_ASSERT_FAILURE_ERRNO
2018-05-23 16:25:08 +02:00
Simon Giesecke
fdfa907187
Problem: test_inproc_connect not using test framework
...
Solution: migrate to unity
2018-05-23 13:48:58 +02:00
Simon Giesecke
ad100b0b9f
Problem: test_xpub_nodrop not using test framework
...
Solution: migrate to unity
2018-05-22 18:33:18 +02:00
Simon Giesecke
f13377de05
Problem: test_pub_invert_matching failing
...
Solution: insert some sleeps to remedy timing dependencies
2018-05-22 18:33:18 +02:00
Simon Giesecke
12c6ae2283
Problem: test_pub_invert_matching not using test framework
...
Solution: migrate to unity
2018-05-22 18:33:18 +02:00
Simon Giesecke
fa467d3425
Problem: test_hwm_pubsub not using test framework
...
Solution: migrate to unity
2018-05-22 18:33:17 +02:00
Simon Giesecke
dd1c87f9d9
Problem: type mismatch errors/warnings in Windows build
...
Solution: fix types
2018-05-15 14:53:40 +02:00
Simon Giesecke
b30cbfc112
Problem: test_spec_dealer not using test framework
...
Solution: migrate to Unity
2018-05-15 13:58:08 +02:00
Luca Boccassi
d81a041f18
Merge pull request #3103 from sigiesec/win-warnings-as-errors
...
Warnings in Windows builds
2018-05-14 22:53:04 +01:00
Simon Giesecke
e447f058e2
Problem: C4244 warnings regarding SOCKET vs. int in test_system
...
Solution: Use fd_t
2018-05-14 21:09:57 +02:00
Simon Giesecke
106127b5d6
Problem: C4267 warnings in test_stream_disconnect
...
Solution: Use size_t instead of int
2018-05-14 21:09:57 +02:00
Simon Giesecke
5ca0d4e8a9
Problem: C4267 warnings in test_spec_router
...
Solution: Use unsigned char instead of size_t
2018-05-14 21:09:57 +02:00
Simon Giesecke
69a6b86310
Problem: C4267 warning test_spec_pushpull
...
Solution: Use unsigned char instead of size_t
2018-05-14 21:09:57 +02:00
Simon Giesecke
3cbc7cb0dc
Problem: C4244 warnings regarding SOCKET vs. int in test_security_null and test_security_plain
...
Solution: Use fd_t
2018-05-14 21:09:56 +02:00
Simon Giesecke
3ee65906af
Problem: various warnings regarding SOCKET vs. int in test_security_curve
...
Solution: Use fd_t
2018-05-14 21:09:56 +02:00
Simon Giesecke
28631d1cd3
Problem: C4550 warning in testutil_security
...
Solution: explicitly compare function pointer against NULL
2018-05-14 19:18:43 +02:00
Luca Boccassi
6092431b97
Merge pull request #3100 from sigiesec/fix-poller-invalid-events
...
Problem: zmq_poller_[add/modify] accept invalid events arguments silently
2018-05-14 15:26:19 +01:00
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
Luca Boccassi
eac265059d
Problem: heartbeat tests are disabled
...
Solution: re-enable them
2018-05-14 13:41:39 +01: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