Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
87170726
Commit
87170726
authored
May 19, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix return of detailed statistics wich fails with many channels
parent
da8a3b09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
ngx_http_push_stream_module.c
src/ngx_http_push_stream_module.c
+1
-3
test_channel_statistics.rb
test/test_channel_statistics.rb
+26
-0
No files found.
src/ngx_http_push_stream_module.c
View file @
87170726
...
...
@@ -299,7 +299,5 @@ ngx_http_push_stream_send_response_all_channels_info_detailed(ngx_http_request_t
r
->
keepalive
=
0
;
// send content tail
ngx_http_push_stream_send_response_chunk
(
r
,
tail
->
data
,
tail
->
len
,
1
);
return
NGX_DONE
;
return
ngx_http_push_stream_send_response_chunk
(
r
,
tail
->
data
,
tail
->
len
,
1
);
}
test/test_channel_statistics.rb
View file @
87170726
...
...
@@ -360,4 +360,30 @@ class TestChannelStatistics < Test::Unit::TestCase
}
end
def
config_test_get_detailed_channels_statistics_to_many_channels
@max_reserved_memory
=
'200m'
end
def
test_get_detailed_channels_statistics_to_many_channels
headers
=
{
'accept'
=>
'application/json'
}
channel
=
'ch_test_get_detailed_channels_statistics_to_many_channels_'
body
=
'body'
number_of_channels
=
20000
#create channel
number_of_channels
.
times
{
|
i
|
publish_message
(
"
#{
channel
}#{
i
}
"
,
headers
,
body
)
}
EventMachine
.
run
{
pub_2
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/channels-stats?id=ALL'
).
get
:head
=>
headers
,
:timeout
=>
30
pub_2
.
callback
{
assert_equal
(
200
,
pub_2
.
response_header
.
status
,
"Request was not accepted"
)
assert_not_equal
(
0
,
pub_2
.
response_header
.
content_length
,
"Empty response was received"
)
response
=
JSON
.
parse
(
pub_2
.
response
)
assert_equal
(
number_of_channels
,
response
[
"infos"
].
length
,
"Didn't received info about the created channels"
)
EventMachine
.
stop
}
fail_if_connecttion_error
(
pub_2
)
}
end
end
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