Commit Graph

24 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
Doron Somech
ad3b36ab95 problem: test_xpub_manual is flapping
The test assumed the subscriptions are arrived in some order, but occasionally the order is not as expected

Solution: fix it
2020-05-14 00:01:06 +03:00
Andrij Abyzov
5a854780f2 Problem: cannot send arbitrary data from XSUB to XPUB.
Solution: now if the first frame in a multipart message is not subscribe/unsubscribe,
the rest of the parts are also considered to be not subscribe/unsubscribe.
2019-12-04 16:25:08 +01:00
Andrij Abyzov
108977c838 Change XSUB -> XPUB multipart message processing.
Now only the first part in a multipart message will be treated as subscribe/unsubscribe.
The rest will be considered user messages regardless of the first byte.
2019-11-19 18:22:12 +01:00
Luca Boccassi
6fb8ef0711 Problem: can no longer send user data from XSUB to XPUB
Solution: fix regression introduced by:
https://github.com/zeromq/libzmq/pull/3168

Correctly fall back to user message if the first byte is neither 0 nor
1, and add a simple unit test

Fixes https://github.com/zeromq/libzmq/issues/3656
2019-09-02 11:33:19 +01: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
713f075fec Problem: test_xpub_manual not yet using unity
Solution: migrate to unity
2018-08-22 11:51:10 +02:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
3536c4b9c4 Problem: XPUB_MANUAL subscriptions not removed on peer term
Solution: remove the pipe from the real trie when a peer disconnects.
Also add a unit test that exercises the behaviour by reconnecting
a different socket and sending a message that matches.
Fixes #2601 and introduced by #2042
2017-06-22 01:02:08 +01:00
Luca Boccassi
8e2027983a Problem: XPUB_MANUAL takes effect for the next bind
Solution: fix unit test to bind after setting the option.
2017-06-22 00:58:44 +01: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
Fedor Sheremetyev
813c738137 Add test for consistent unsubscription in XPUB manual mode.
Expect custom messages on both explicit unsubscription and pipe termination.
2016-06-17 11:36:13 +01:00
hitstergtd
8872809337 Problem: XPUB test broken since #1566 on Windows
Solution:
- Adjust test_xpub_proxy_unsubscribe_disconnect() to support different
  protocol types
- Exclude the IPC tests on Windows and OpenVMS

H/T: @somdoron
2016-04-24 16:56:06 +01:00
Luca Boccassi
a93600309f Problem: assertion in test_xpub_manual is swapped
Solution: check that both pointers passed as arguments to
test_missing_subscription are non-NULL, instead of the opposite.
2016-04-23 18:16:49 +01:00
hitstergtd
ff02862171 Problem: XPUB test broken on Windows since #1569
Solution:
- Adjust test_subscriptions() to support different protocol types
- Run TCP and IPC tests everywhere but on Windows and OpenVMS
2016-04-23 16:18:38 +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
David Jelenc
64ffda90d2 Problem: Tests in Travis are failing randomly
Tests were failing, because some deque calls were causing undefined
behavior: calling front() or pop_front() on an empty deque. Such
calls are now safeguarded.
2015-09-06 01:49:50 +02:00
David Jelenc
8fd71d631d Fixed missing subscriptions on XPUB with manual subscriptions
The patch fixes the issue #1568.
2015-09-05 15:56:26 +02:00
David Jelenc
dd35e1db0f Problem: lingering subscriptions on XPUB sockets (#1566)
The patch fixes lingering subscriptions that occur upon disconnection
on XPUB sockets with option XPUB_MANUAL when used in a XPUB-XSUB
proxies.
2015-09-05 12:07:50 +02:00
Joe Eli McIlvain
61217a2686 Problem: Source files contain mixed tabs and spaces.
Solution: Convert to spaces and remove trailing whitespace in these files.
2015-08-20 07:46:34 -07: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
somdoron
96e29f1455 Add manual control over subscriptions to Pub 2014-11-26 13:08:39 +02:00