Commit Graph

35 Commits

Author SHA1 Message Date
Luca Boccassi
da31917f4f Relicense from LGPL3 + exceptions to Mozilla Public License version 2.0
Relicense permission collected from all relevant authors as tallied at:
https://github.com/rlenferink/libzmq-relicense/blob/master/checklist.md
The relicense grants are collected under RELICENSE/ and will be moved
to the above repository in a later commit.

Fixes https://github.com/zeromq/libzmq/issues/2376
2023-06-05 20:31:47 +01:00
Simon Giesecke
7f64b925aa Problem: code from bind_loopback_ipv4 is duplicated
Solution: call bind_loopback_ipv4 where applicable
2019-03-24 13:34:13 -04:00
Simon Giesecke
af4fa22fd8 Problem: default test setUp/tearDown functions duplicated in many test programs
Solution: define setUp/tearDown functions via SETUP_TEARDOWN_TESTCONTEXT macro where possible
2019-03-24 12:53:12 -04:00
Simon Giesecke
1450830611 Problem: unused include directives
Solution: remove and add where needed
2019-03-23 09:46:37 -04: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
9e3932b46b Problem: test assertion failures do not clean up properly
Solution: provide test_context and manage sockets of test_context via setup and teardown
2018-03-14 12:24:21 +01:00
Simon Giesecke
ae558706bf Problem: test_hwm and test_router_mandatory not yet using unity
Solution: migrate to unity
2018-03-14 08:22:23 +01:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
2e2c22dd5b Problem: DRAFT build broken with old GCC due to GNU modifier
Solution: print unsigned integers instead of size_t to avoid the error:

  error: ISO C++ does not support the 'z' gnu_printf length modifier

due to very old version of GCC.
2017-10-17 13:36:10 +01:00
sigiesec
1414bf938c Problem: use of unqualified "id" in code example
Solution: use "routing_id" instead
2017-09-19 17:54:52 +02:00
sigiesec
9e7507b38b Problem: term "identity" is confusing
Solution: replace by "routing id"
2017-09-19 17:53:44 +02:00
Doron Somech
af03241dcb Revert "Problem: term "identity" is confusing" 2017-09-07 15:47:43 +03:00
sigiesec
1daf83079a Problem: term "identity" is confusing
Solution: replace by "routing id"
2017-09-06 17:45:56 +02:00
sigiesec
f3b268d84f Problem: no tests for error cases of zmq_socket_get_peer_state
Solution: added tests
2017-09-01 16:28:59 +02:00
sigiesec
eeccbbd6f8 Problem: test case fails with tcp transport
Solution: use inproc transport instead
2017-09-01 16:28:59 +02:00
sigiesec
fc334bc759 Problem: unclean and duplicated test code
Solution: refactoring
2017-09-01 16:28:59 +02:00
sigiesec
f70097c1cf Problem: test does not trigger HWM
Solution: modify order of operations, add diagnostic output
2017-09-01 16:28:59 +02:00
sigiesec
cda20260b3 Problem: missing call to zmq_poller_destroy
Solution: added call
2017-09-01 16:28:58 +02:00
sigiesec
efa86fe629 Problem: no test case using the proposed zmq_socket_get_peer_state function
Solution: added test case (with dummy implementation of zmq_socket_get_peer_state)
2017-09-01 16:28:58 +02:00
sigiesec
49e1b8b75f Problem: test case in main function
Solution: extracted test_basic function
2017-09-01 16:28:57 +02:00
Luca Boccassi
5934919f3e Problem: tests bind to hardcoded TCP ports
Solution: use ZMQ_LAST_ENDPOINT in most places. This alllows running
tests in paralle, and on over-booked shared machines where many of
the ports would be already in use.
Keep 3 tests with an hardcoded port, as there are some code paths that
require it (eg: connect before bind), but list those ports in
tests/testutil.hpp as macros so that they do not overlap and still
allow parallel runs.

These changes were inspired by a patch uploaded to Ubuntu by the
package maintainer, Steve Langasek <steve.langasek@ubuntu.com>.
Thank you Steve!
2017-05-01 22:57:05 +01:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00
Pieter Hintjens
94d9a4ffdf Problem: copyright statements are out of date
Solution: update for 2015

Fixes #1320
2015-01-22 10:32:37 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
Pieter Hintjens
576e3ca5e0 Added z85 codec to ZMQ API
* Removed redundant Z85 code and include files from project
* Simplified use of headers in test cases (now they all just use testutil.hpp)
* Export zmq_z85_encode() and zmq_z85_decode() in API
* Added man pages for these two functions
2013-09-15 20:13:44 +02:00
Richard Newton
7f74fc7c99 Port tests to windows and add to cmake build. 2013-08-17 13:43:45 +01:00
Pieter Hintjens
f1738b9b92 More copyright cleanups 2013-03-12 17:04:51 +01:00
Pieter Hintjens
963c6a8e2f Lots of cleanups to self-tests
* Removed or truncated sleeps so the tests run faster
* Removed dependencies on zmq_utils
* Rewrote a few tests that were confusing
* Minor code cleanups
2013-01-31 19:46:22 +01:00
Pieter Hintjens
c39cb0bde1 Rewrote completely, was bogusly testing EAGAIN 2013-01-31 16:26:28 +01:00
Pieter Hintjens
8c9289342a Fixed use of deprecated zmq_init/term 2013-01-31 09:10:49 +01:00
Min(Dongmin Yu)
a0cecc718d returns -1 with EAGAIN when mandatory is set and pipe is full 2012-12-11 19:41:36 +09:00
Min(Dongmin Yu)
9382941adc returns EHOSTUNREACH when a peer is full if ZMQ_ROUTER_MANDATORY is set 2012-12-08 10:20:42 +09:00
Martin Hurton
d16e0a5342 Resolve LIBZMQ-458
Ref: https://zeromq.jira.com/browse/LIBZMQ-458
2012-10-30 11:03:43 +01:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00