Commit Graph

26 Commits

Author SHA1 Message Date
Simon Giesecke
4a48184032 Problem: tests without test framework
Solution: migrate to unity
2018-12-10 07:01:06 -05:00
Simon Giesecke
779d120fa3 Problem: tests do not follow naming style
Solution: apply naming style
2018-05-27 13:24:08 +02:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
sigiesec
4b821d8f84 Problem: remaining uses of "identity"
Solution: replaced by "routing id"
2017-09-19 17:54:59 +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
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
Luca Boccassi
4a84f8a02e Problem: tests use various sleep patterns to wait
Solution: use msleep (SETTLE_TIME) everywhere when waiting for the
connections/sockets to be settled instead of a variety of patterns
and functions to make tests more coherent.
2016-02-13 18:01:03 +00: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
a7a512ab3d Problem: test cases are failing on slower PCs (eee PC)
Solution: raise timeouts from 100-150 msec to 250 msec
2015-01-30 11:57:31 +01: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
5b60540ed0 Removed over-long pauses in tests
- used msleep (10) in most places instead of zmq_sleep (1)
- may cause failures on slower machines
- to change, modify SETTLE_TIME in testutil.h
- tested down to 1 msec on fast boxes
2013-11-06 13:42:57 +01:00
Markus Rothe
b13230510c tests: don't listen on public ports 2013-09-18 12:58:19 +02: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
d46c2ee2fc Disabled last step in test_spec_req so build can complete 2013-07-14 13:04:31 +02:00
Christian Kamm
7de23c0c8d Fix intermittent failure in test_spec_req.
There still is a problem when a stale peer's message
arrives at the REQ just after a request was sent to that peer.
2013-07-14 11:57:15 +02:00
Pieter Hintjens
bccf3d6126 Merge pull request #613 from ckamm/coding-style-spec-tests
Fix coding style in spec tests.
2013-07-14 02:32:20 -07:00
Christian Kamm
bbc9a61197 Fix coding style in spec tests. 2013-07-14 08:33:33 +02:00
Christian Kamm
c56d797bf9 REQ sockets drop replies from unasked peers.
* Add lb_t::sendpipe() that returns the pipe that was used for sending,
  similar to fq_t::recvpipe().
* Add forwarder functions to dealer_t to access these two.
* Add logic to req_t to ignore replies on pipes that are not the one
  where the request was sent.
* Enable test in test_spec_req.
2013-07-14 07:55:47 +02:00
Pieter Hintjens
9ca6898f24 Got new test cases working with libzmq
* disabled the specific tests that do not work (yet) on libzmq
* cleaned up one source (test_spec_rep.c) but the others need similar work
* added sleep in test_spec_rep to allow connects time to happen; this would
  not be needed if we connected out to the REP peers instead in from them,
  but I didn't want to change the logic of the test code.
2013-07-07 12:49:24 +02:00
Christian Kamm
dfba19c4b6 Make pipeline/reqrep tests try tcp:// endpoints.
The inproc:// endpoints sometimes use different code paths so
testing with regular tcp:// endpoints as well can show different
issues.
2013-07-05 17:58:01 +02:00
Christian Kamm
798b394087 Add tests for Request-Reply pattern sockets.
* See http://rfc.zeromq.org/spec:28/REQREP
* Not all testable statements are covered.
* At this point, there are several failures:
  - test_spec_req: The REQ socket does not correctly discard messages
    from peers that are not currently being talked to.
  - test_spec_dealer/router: On disconnect, the queues seem to not be
    emptied. The DEALER can still receive a message the disconnected
    peer sent, the ROUTER can still send to the identity of the dis-
    connected peer.
2013-07-02 15:04:31 +02:00