Commit Graph

929 Commits

Author SHA1 Message Date
Mikko Koppanen
8f8bfcaba0 Fixed issue with req assertions (issue 252)
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-13 16:27:07 +02:00
Martin Sustrik
2afb791ec2 Subscription forwarding test added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 15:54:13 +02:00
Martin Sustrik
215cfc653e REQ/REP drop test extended
The test now checks whether replies are dropped when reply pipe
is overflowed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 15:28:02 +02:00
Martin Sustrik
da26134aa6 Inproc tests need no I/O threads
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 13:44:41 +02:00
Martin Sustrik
7c0c798120 Command are now stored in ypipes instead of in socketpairs
Storing commands in OS socket buffers caused whole lot of
problems when free space in the buffer ran out. This patch
stores commands in ypipes instead and uses socketpair just
to signal the other thread, ie. at most one byte is stored
in the socketpair at any single instant.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 13:33:45 +02:00
Martin Sustrik
d1373792f7 Outstanding requests dropped when requester dies (issue 190)
So far the requests in req/rep pattern were delivered to and processed
by worker even though the original requester was dead. Thus,
the worker processing replies with noone to deliver results to.
This optimisation drops requests in two situations:

1. Queued inbound requests in XREP socket when peer disconnects.
2. Queued outbound requests in XREQ when socket is closed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-23 07:57:47 +02:00
Martin Sustrik
ec81f8fb25 New wire format for REQ/REP pattern
This patch introduces two changes:
1. 32-bit ID is used to identify the peer instead of UUID
2. REQ socket seeds the label stack with unique 32-bit request ID
   It also drops any replies with non-matching request ID

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-22 11:02:16 +02:00
Martin Sustrik
ada5d42472 Basic tests now test multi-part messages instead of single-part
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 11:16:10 +02:00
Martin Sustrik
f4760f02c3 Disable timeo test on MinGW
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 07:35:24 +02:00
Fabien Ninoles
d7923f08ca Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO.
- Add doc and tests
- Add options and setup
- Wait using poll/select

Signed-off-by: Fabien Ninoles <fabien@tzone.org>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-17 12:22:02 +02:00
Martin Sustrik
0f6f7276e3 Move the pipe termination code to socket_base_t
So far, the pipe termination code was spread among socket type
classes, fair queuer, load balancer, etc. This patch moves
all the associated logic to a single place.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-23 20:30:01 +02:00
Pieter Hintjens
e78cc47b18 Moved tests off 5555 (conflict with Eclipse)
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-05-02 18:59:55 +02:00
Martin Sustrik
abb184a051 ZMQ_NOBLOCK renamed ZMQ_DONTWAIT
Done because of POSIX compliance

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-26 10:38:40 +01:00
Martin Sustrik
bc4a1ce334 ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWM
These new options allow to control the maximum size of the
inbound and outbound message pipe separately.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 16:47:33 +01:00
Martin Sustrik
507718ee1a ZMQ_HWM type changed to int
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 15:43:03 +01:00
Martin Sustrik
fb27a000d9 send/recv was changed to send/recv/sendmsg/recvmsg
send/recv now complies with POSIX by using raw buffers instead
of message objects and by returning number of bytes sent/recvd
instead of 0/-1.

The return value is changed accordingly for sendmsg and recvmsg.

Note that related man pages will be fixed in a separate patch.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 11:53:55 +01:00
Martin Sustrik
7d87db0529 Auto-tests modified to use C API instead of C++ binding
As a side effect, broker HWM test was fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 10:03:49 +01:00
Martin Sustrik
18b9ebea32 The copyrights in file headers updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 16:30:40 +01:00
Mikko Koppanen
72d320366f Added test for HWM
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-01-30 11:51:30 +01:00
Mikko Koppanen
8e61a11b39 Do not execute ipc tests under MinGW
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-01-20 22:13:01 +01:00
Martin Sustrik
325dd2f091 Functions passed to pthread_create are declared as extern "C"
So far these were declared as C++ static functions which
was incorrect and caused warnings with SunStudio.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-27 22:19:43 +01:00
Mikko Koppanen
3dbd5d5872 Fix mingw32 build
MinGW32 defines __int64_t as long long, which causes the build to fail
unless -Wno-long-long is used. In addition the shutdown_stress test
isn't currently compatible with Win.

Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-11-17 15:05:01 +01:00
Martin Sustrik
b358df9fff Name of "GNU Lesser Public License" corrected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 15:08:28 +02:00
Martin Sustrik
1a6cd59e8b stress test for shutdown process added 2010-10-01 16:03:08 +02:00
Guido Goldstein
0a8473dedd Added tests for transports per socket 2010-08-28 13:58:23 +02:00
Martin Sustrik
92923cd40b bug in pipe deactivation fixed 2010-08-28 08:44:12 +02:00
Guido Goldstein
67aa788577 Fixed socket states in tests 2010-08-28 06:31:40 +02:00
Guido Goldstein
4d9b046977 two tests added 2010-08-27 21:13:45 +02:00
Martin Lucina
35cb1fade6 Add a basic framework for a test suite
The test suite uses the standard automake support. Tests are always built,
but run only when you do a "make check".
2010-08-27 18:35:59 +02:00