Commit Graph

456 Commits

Author SHA1 Message Date
somdoron
24fc0d4e89 drop the socket postfix from poller methods 2015-10-21 14:04:33 +03:00
somdoron
476ba22e0a ZMQ_Poller support more event types 2015-10-21 10:14:36 +03:00
somdoron
6501b8089f port zpoller to libzmq as zmq_poller 2015-10-18 21:07:23 +03:00
Richard Newton
3f4f3c1137 Fix windows cmake build 2015-09-14 13:21:20 +01:00
Constantin Rack
2c94bb42c5 Merge pull request #1578 from hintjens/master
Problem: drop tests on CLIENT/SERVER are misleading
2015-09-13 14:18:49 +02:00
Pieter Hintjens
50859e40b9 Problem: drop tests on CLIENT/SERVER are misleading
These sockets deal only with single part data (at present), so the
drop tests are misleading / inappropriate.

Solution: remove them.
2015-09-13 12:17:53 +02:00
Joe Eli McIlvain
fb57110b94 Merge pull request #1577 from hintjens/master
Various cleanups for CLIENT-SERVER sockets
2015-09-11 14:24:51 -07:00
Pieter Hintjens
6b00f40f74 Problem: test_client/server_drop_more are invalid
These tests connected CLIENT and SERVER to DEALER... this isn't
allowed. I changed to CLIENT-to-SERVER in both cases. The result
was aborts in client.cpp and server.cpp which cannot handle
invalid multipart data.

I removed the asserts in each of these in xsend.

Solution: fix the test cases and remove the (unwanted?) asserts
in client.cpp:xsend and server.cpp:xsend.
2015-09-11 17:07:50 -04:00
Pieter Hintjens
c2dffb9908 Problem: threadsafe test uses CLIENT-to-CLIENT
Solution: fix to use CLIENT-to-SERVER and increase number of messages
sent to 100K per thread, to better stress thread safety.
2015-09-11 17:01:27 -04:00
Pieter Hintjens
d416ffcec5 Problem: cannot build single test case in tests
This is due to the mangled include of platform.h, which was to make
CMake happy.

Solution: in CMakeLists.txt, define USING_CMAKE and then look for
platform.h in current directory if that is defined, else look in
../src/ as one would expect.
2015-09-11 16:42:26 -04:00
Pieter Hintjens
87f2dff38c Problem: zmq_msg_get_routing_id () is not consistent with API
We do not use 'get' for getters.

Solution: rename to zmq_msg_routing_id () for public API.
2015-09-11 13:15:00 -04: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
Pieter Hintjens
1fdf8f78e4 Cleaned up test case 2015-09-02 09:55:19 +02:00
Richard Newton
096007c574 Fix zmq crash when calling shutdown with a pending inproc socket connect 2015-08-21 10:06:54 +01: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
somdoron
4da5ff6a7d revert to original zmq_polland creating zmq_pollfd_poll for polling on pollfd 2015-08-17 18:57:47 +03:00
somdoron
d83b045347 rename poller to pollfd 2015-08-17 14:20:49 +03:00
somdoron
5bae6911af remove poller field, using fd instead 2015-08-17 11:56:23 +03:00
somdoron
1aaa893e02 add tests for polling on thread safe sockets 2015-08-16 13:57:28 +03:00
somdoron
34968771ca add an option to check if the socket is thread safe 2015-08-16 11:50:50 +03:00
Constantin Rack
effc26c695 Merge pull request #1476 from hintjens/master
Problem: lack test case for large stream messages
2015-08-12 10:03:45 +02:00
Constantin Rack
08c2a9274e Merge pull request #1514 from rikvdh/master
Merge fix for zeromq/zeromq4-1#52, getsockopt ZMQ_RCVMORE now resets all bits
2015-08-11 23:30:59 +02:00
Rik van der Heijden
5485d6e371 Check proxy return values in tests 2015-08-11 21:44:41 +02:00
Rik van der Heijden
c68e9a39bf Merge fix for zeromq/zeromq4-1#52, getsockopt ZMQ_RCVMORE now resets all bits 2015-08-11 21:37:50 +02:00
Pieter Hintjens
fd9bd1b2a5 Problem: broke Cmake build 2015-08-11 19:35:48 +02:00
Pieter Hintjens
11fba2b813 Fixed compile errors in test_stream 2015-08-11 19:34:25 +02:00
Pieter Hintjens
92c4decb69 Problem: lack test case for large stream messages
Solution: added to test_stream.cpp
2015-08-11 19:34:25 +02:00
Pieter Hintjens
a656b399cc Merge pull request #1496 from brian-peloton/macro-to-disable-test-timeout
Add a way to disable libzmq's internal test timeout.
2015-07-28 22:57:58 +02:00
Pieter Hintjens
94b6fca406 Merge pull request #1495 from brian-peloton/fix-test-flakiness
Increase sleep in test to fix flakiness under CPU load.
2015-07-28 22:57:46 +02:00
Pieter Hintjens
5dee46052d Merge pull request #1494 from brian-peloton/fix-partial-recv-in-test
Retry recv if it only returns part of a message during tests.
2015-07-28 22:57:35 +02:00
Brian Silverman
c4c5135db6 Retry recv if it only returns part of a message during tests.
Under linux 3.16.0-4-amd64, I was getting occasional test failures
before fixing this.
2015-07-28 13:48:48 -07:00
Brian Silverman
e449d7bfbd Fix test flakiness.
I'm pretty sure this is an issue with the test being too picky and not a
bug, but the behavior in this situation is not well documented.
2015-07-28 13:48:23 -07:00
Brian Silverman
f86bded783 Increase sleep in test to fix flakiness under CPU load. 2015-07-28 13:47:56 -07:00
Brian Silverman
cb0491ca18 Add a way to disable libzmq's internal test timeout.
It's nice to be able to disable libzmq's internal timeout when there's
another timeout in the test runner being used which gives nicer error
messages.
2015-07-28 13:47:19 -07:00
KIU Shueng Chuan
fd51b0e508 update test that relied on connect notifications to be disabled 2015-07-24 05:39:47 +08:00
Brian Silverman
18791f2bfb Fix several missing msg_t::close calls.
I traced memory leaks found using AddressSanitizer down to these.
2015-07-21 19:42:20 -07:00
Brian Silverman
a88524d388 Fix test_proxy hanging occasionally by setting ZMQ_LINGER to 0. 2015-07-20 19:41:23 -07:00
Jens Auer
23797120ff Fixed #1477 corruption in "zero-copy" raw_decoder for payloads larger than 8192 bytes #1477
Fixed wrong message::init arguments.
2015-07-20 22:22:13 +02:00
Dylan Cali
0f208c122d be pedantic and call zmq_close in tests 2015-06-28 22:32:15 -05:00
Dylan Cali
d14f419743 another errant comment 2015-06-28 21:29:23 -05:00
Dylan Cali
6dac5092ad fix errant comments 2015-06-28 21:27:06 -05:00
Dylan Cali
a9fd750e1c add tests for #949 2015-06-28 21:23:25 -05:00
Jonathan Reams
e9a5bc8d1e Fix units and default values for heartbeats options
Set the ZMQ_HEARTBEAT_TIMEOUT to default to the value of
ZMQ_HEARTBEAT_IVL if it's not explicitly set.
Change the units of ZMQ_HEARTBEAT_TTL to milliseconds in the API
and round down to the nearest decisecond so that all the options
are using the same units.
Make the maximum heartbeat TTL match the spec (6553 seconds)
2015-06-26 14:25:58 -04:00
Jonathan Reams
df0c7076bd Fix test_heartbeats compile in VS2013 2015-06-24 14:28:36 -04:00
Jonathan Reams
cbb3b176a6 Add ZMTP heartbeats
This commit adds ZMTP connection heartbeats described in
http://rfc.zeromq.org/spec:37/ZMTP.
2015-06-24 13:24:53 -04:00
Constantin Rack
15f9ee19cb Solution: allow brackets in tcp ipv6 address 2015-06-23 08:54:49 +02:00
Richard Newton
f696d0399c Fix tabbing 2015-06-10 16:47:23 +01:00
Richard Newton
8484e1606d Fix windows build 2015-06-10 16:43:59 +01:00