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
67adc458
Commit
67adc458
authored
Jan 18, 2020
by
Matthias Loy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Roundtrip test for websocket url without a path
parent
c357c378
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
test_ws_transport.cpp
tests/test_ws_transport.cpp
+20
-0
No files found.
tests/test_ws_transport.cpp
View file @
67adc458
...
@@ -52,6 +52,25 @@ void test_roundtrip ()
...
@@ -52,6 +52,25 @@ void test_roundtrip ()
test_context_socket_close
(
sb
);
test_context_socket_close
(
sb
);
}
}
void
test_roundtrip_without_path
()
{
char
connect_address
[
MAX_SOCKET_STRING
];
size_t
addr_length
=
sizeof
(
connect_address
);
void
*
sb
=
test_context_socket
(
ZMQ_REP
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
sb
,
"ws://*:*"
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
sb
,
ZMQ_LAST_ENDPOINT
,
connect_address
,
&
addr_length
));
void
*
sc
=
test_context_socket
(
ZMQ_REQ
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_connect
(
sc
,
connect_address
));
bounce
(
sb
,
sc
);
test_context_socket_close
(
sc
);
test_context_socket_close
(
sb
);
}
void
test_heartbeat
()
void
test_heartbeat
()
{
{
char
connect_address
[
MAX_SOCKET_STRING
+
strlen
(
"/heartbeat"
)];
char
connect_address
[
MAX_SOCKET_STRING
+
strlen
(
"/heartbeat"
)];
...
@@ -202,6 +221,7 @@ int main ()
...
@@ -202,6 +221,7 @@ int main ()
UNITY_BEGIN
();
UNITY_BEGIN
();
RUN_TEST
(
test_roundtrip
);
RUN_TEST
(
test_roundtrip
);
RUN_TEST
(
test_roundtrip_without_path
);
RUN_TEST
(
test_short_message
);
RUN_TEST
(
test_short_message
);
RUN_TEST
(
test_large_message
);
RUN_TEST
(
test_large_message
);
RUN_TEST
(
test_heartbeat
);
RUN_TEST
(
test_heartbeat
);
...
...
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