Commit Graph

19 Commits

Author SHA1 Message Date
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
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
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
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
Luca Boccassi
19060345e4 Problem: TIPC availability check is too strict (#2977)
* Problem: TIPC availability check is too strict

Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.

TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.

* Problem: no Travis tests for TIPC

Solution: mark one job with sudo: required and load the kernel module

* Problem: CMake fails when test returns 77 (skip)

Solution: set property to let it mark the test as skipped as intended
2018-03-09 17:47:42 +01:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Erik Hugne
f81ef1bc72 tipc: add support for address domain suffix
The TIPC protocol bindings in ZeroMQ defaults to a lookup domain
of 1.0.0 to prevent 'closest first' search, and instead always
do round robin if several sockets in the network or node have
the same name published. In retrospect, this might have been a
bad idea because it won't work on standalone configurations.
We solve this by allowing an optional domain suffix to be provided
in the address, and 0.0.0 should be used in that case, or if the
TIPC address range in the cluster configuration is defined to some
other value. Domain suffixes are only relevant for connecting
addresses.

Signed-off-by: Erik Hugne <erik.hugne@gmail.com>
2016-05-11 21:54:25 +02:00
Pieter Hintjens
bbcc79d188 Problem: tests don't build on Windows
There were numerous small issues with test cases:

- some lacked the right source file header
- some were not portable at all
- some were using internal libzmq APIs (headers)

Solution: fixed and cleaned up.
2016-02-12 15:48:37 +01:00
Pieter Hintjens
44c6b0484e Revert "Revert "Problem: deprecated use and reference of zmq_term"" 2016-02-01 23:00:06 +01:00
Pieter Hintjens
1708bfefb7 Revert "Problem: deprecated use and reference of zmq_term" 2016-02-01 22:41:51 +01:00
Constantin Rack
0d171563d0 Problem: tests use deprecated zmq_term function
Solution: replace all occurrences with `zmq_ctx_term`
2016-02-01 21:40:24 +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
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
Ewen McNeill
829b1bb4d4 Include testutil.hpp if using SETTLE_TIME
Updated:
   tests/test_connect_delay_tipc.cpp
   tests/test_sub_forward_tipc.cpp
   tests/test_term_endpoint_tipc.cpp
2014-07-24 13:00:21 +12: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
Erik Hugne
9d5a379331 zmq: add TIPC transport tests
The tests are identical to the TCP ones, only the
addressing is changed.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
2013-11-01 10:10:02 +01:00