Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
a9a15ccf
Commit
a9a15ccf
authored
May 16, 2014
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use different endpoint for each test step
parent
aad54b2a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
test_inproc_connect.cpp
tests/test_inproc_connect.cpp
+12
-12
No files found.
tests/test_inproc_connect.cpp
View file @
a9a15ccf
...
...
@@ -24,7 +24,7 @@ static void pusher (void *ctx)
// Connect first
void
*
connectSocket
=
zmq_socket
(
ctx
,
ZMQ_PAIR
);
assert
(
connectSocket
);
int
rc
=
zmq_connect
(
connectSocket
,
"inproc://
a
"
);
int
rc
=
zmq_connect
(
connectSocket
,
"inproc://
sink
"
);
assert
(
rc
==
0
);
// Queue up some data
...
...
@@ -44,13 +44,13 @@ void test_bind_before_connect ()
// Bind first
void
*
bindSocket
=
zmq_socket
(
ctx
,
ZMQ_PAIR
);
assert
(
bindSocket
);
int
rc
=
zmq_bind
(
bindSocket
,
"inproc://
a
"
);
int
rc
=
zmq_bind
(
bindSocket
,
"inproc://
bbc
"
);
assert
(
rc
==
0
);
// Now connect
void
*
connectSocket
=
zmq_socket
(
ctx
,
ZMQ_PAIR
);
assert
(
connectSocket
);
rc
=
zmq_connect
(
connectSocket
,
"inproc://
a
"
);
rc
=
zmq_connect
(
connectSocket
,
"inproc://
bbc
"
);
assert
(
rc
==
0
);
// Queue up some data
...
...
@@ -85,7 +85,7 @@ void test_connect_before_bind ()
// Connect first
void
*
connectSocket
=
zmq_socket
(
ctx
,
ZMQ_PAIR
);
assert
(
connectSocket
);
int
rc
=
zmq_connect
(
connectSocket
,
"inproc://
a
"
);
int
rc
=
zmq_connect
(
connectSocket
,
"inproc://
cbb
"
);
assert
(
rc
==
0
);
// Queue up some data
...
...
@@ -95,7 +95,7 @@ void test_connect_before_bind ()
// Now bind
void
*
bindSocket
=
zmq_socket
(
ctx
,
ZMQ_PAIR
);
assert
(
bindSocket
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
a
"
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
cbb
"
);
assert
(
rc
==
0
);
// Read pending message
...
...
@@ -126,7 +126,7 @@ void test_connect_before_bind_pub_sub ()
// Connect first
void
*
connectSocket
=
zmq_socket
(
ctx
,
ZMQ_PUB
);
assert
(
connectSocket
);
int
rc
=
zmq_connect
(
connectSocket
,
"inproc://
a
"
);
int
rc
=
zmq_connect
(
connectSocket
,
"inproc://
cbbps
"
);
assert
(
rc
==
0
);
// Queue up some data, this will be dropped
...
...
@@ -138,7 +138,7 @@ void test_connect_before_bind_pub_sub ()
assert
(
bindSocket
);
rc
=
zmq_setsockopt
(
bindSocket
,
ZMQ_SUBSCRIBE
,
""
,
0
);
assert
(
rc
==
0
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
a
"
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
cbbps
"
);
assert
(
rc
==
0
);
// Wait for pub-sub connection to happen
...
...
@@ -182,7 +182,7 @@ void test_multiple_connects ()
{
connectSocket
[
i
]
=
zmq_socket
(
ctx
,
ZMQ_PUSH
);
assert
(
connectSocket
[
i
]);
rc
=
zmq_connect
(
connectSocket
[
i
],
"inproc://
a
"
);
rc
=
zmq_connect
(
connectSocket
[
i
],
"inproc://
multiple
"
);
assert
(
rc
==
0
);
// Queue up some data
...
...
@@ -193,7 +193,7 @@ void test_multiple_connects ()
// Now bind
void
*
bindSocket
=
zmq_socket
(
ctx
,
ZMQ_PULL
);
assert
(
bindSocket
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
a
"
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
multiple
"
);
assert
(
rc
==
0
);
for
(
unsigned
int
i
=
0
;
i
<
no_of_connects
;
++
i
)
...
...
@@ -240,7 +240,7 @@ void test_multiple_threads ()
// Now bind
void
*
bindSocket
=
zmq_socket
(
ctx
,
ZMQ_PULL
);
assert
(
bindSocket
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
a
"
);
rc
=
zmq_bind
(
bindSocket
,
"inproc://
sink
"
);
assert
(
rc
==
0
);
for
(
unsigned
int
i
=
0
;
i
<
no_of_threads
;
++
i
)
...
...
@@ -277,13 +277,13 @@ void test_identity ()
void
*
sc
=
zmq_socket
(
ctx
,
ZMQ_DEALER
);
assert
(
sc
);
int
rc
=
zmq_connect
(
sc
,
"inproc://
a
"
);
int
rc
=
zmq_connect
(
sc
,
"inproc://
identity
"
);
assert
(
rc
==
0
);
void
*
sb
=
zmq_socket
(
ctx
,
ZMQ_ROUTER
);
assert
(
sb
);
rc
=
zmq_bind
(
sb
,
"inproc://
a
"
);
rc
=
zmq_bind
(
sb
,
"inproc://
identity
"
);
assert
(
rc
==
0
);
// Send 2-part message.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment