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
2a83fa53
Commit
2a83fa53
authored
Aug 28, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improving test to check client body temp dir still empty after publish a big message
parent
a2dba6bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
base_test_case.rb
test/base_test_case.rb
+1
-0
test_publisher.rb
test/test_publisher.rb
+2
-0
test_publisher_admin.rb
test/test_publisher_admin.rb
+2
-0
No files found.
test/base_test_case.rb
View file @
2a83fa53
...
...
@@ -85,6 +85,7 @@ module BaseTestCase
File
.
delete
(
@main_error_log
)
if
File
.
exist?
(
@main_error_log
)
File
.
delete
(
@access_log
)
if
File
.
exist?
(
@access_log
)
File
.
delete
(
@error_log
)
if
File
.
exist?
(
@error_log
)
FileUtils
.
rm_rf
(
@client_body_temp
)
if
File
.
exist?
(
@client_body_temp
)
end
end
...
...
test/test_publisher.rb
View file @
2a83fa53
...
...
@@ -194,6 +194,7 @@ class TestPublisher < Test::Unit::TestCase
pub_1
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/pub?id='
+
channel
.
to_s
).
post
:head
=>
headers
,
:body
=>
body
,
:timeout
=>
30
pub_1
.
callback
{
assert_equal
(
200
,
pub_1
.
response_header
.
status
,
"Request was not accepted"
)
fail
(
"Let a file on client body temp dir"
)
unless
Dir
.
entries
(
@client_body_temp
).
select
{
|
f
|
f
if
File
.
file?
(
File
.
expand_path
(
f
,
@client_body_temp
))
}.
empty?
EventMachine
.
stop
}
}
...
...
@@ -218,6 +219,7 @@ class TestPublisher < Test::Unit::TestCase
pub_1
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/pub?id='
+
channel
.
to_s
).
post
:head
=>
headers
,
:body
=>
body
,
:timeout
=>
30
pub_1
.
callback
{
assert_equal
(
200
,
pub_1
.
response_header
.
status
,
"Request was not accepted"
)
fail
(
"Let a file on client body temp dir"
)
unless
Dir
.
entries
(
@client_body_temp
).
select
{
|
f
|
f
if
File
.
file?
(
File
.
expand_path
(
f
,
@client_body_temp
))
}.
empty?
EventMachine
.
stop
}
}
...
...
test/test_publisher_admin.rb
View file @
2a83fa53
...
...
@@ -197,6 +197,7 @@ class TestPublisherAdmin < Test::Unit::TestCase
pub_1
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/pub?id='
+
channel
.
to_s
).
post
:head
=>
headers
,
:body
=>
body
,
:timeout
=>
30
pub_1
.
callback
{
assert_equal
(
200
,
pub_1
.
response_header
.
status
,
"Request was not accepted"
)
fail
(
"Let a file on client body temp dir"
)
unless
Dir
.
entries
(
@client_body_temp
).
select
{
|
f
|
f
if
File
.
file?
(
File
.
expand_path
(
f
,
@client_body_temp
))
}.
empty?
EventMachine
.
stop
}
}
...
...
@@ -221,6 +222,7 @@ class TestPublisherAdmin < Test::Unit::TestCase
pub_1
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/pub?id='
+
channel
.
to_s
).
post
:head
=>
headers
,
:body
=>
body
,
:timeout
=>
30
pub_1
.
callback
{
assert_equal
(
200
,
pub_1
.
response_header
.
status
,
"Request was not accepted"
)
fail
(
"Let a file on client body temp dir"
)
unless
Dir
.
entries
(
@client_body_temp
).
select
{
|
f
|
f
if
File
.
file?
(
File
.
expand_path
(
f
,
@client_body_temp
))
}.
empty?
EventMachine
.
stop
}
}
...
...
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