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
3a4907ae
Commit
3a4907ae
authored
Apr 30, 2013
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to generate core dumps during tests if a segmentation fault happens
parent
782f14f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
measure_memory_spec.rb
misc/spec/mix/measure_memory_spec.rb
+1
-1
nginx_configuration.rb
misc/spec/nginx_configuration.rb
+3
-3
spec_helper.rb
misc/spec/spec_helper.rb
+12
-0
No files found.
misc/spec/mix/measure_memory_spec.rb
View file @
3a4907ae
...
...
@@ -107,7 +107,7 @@ describe "Measure Memory" do
channel
=
'ch_test_subscriber_system_size'
body
=
'1'
nginx_run_server
(
config
.
merge
({
:header_template
=>
"H"
}),
:timeout
=>
15
)
do
|
conf
|
nginx_run_server
(
config
.
merge
({
:header_template
=>
"H"
,
:master_process
=>
'off'
,
:daemon
=>
'off'
}),
:timeout
=>
15
)
do
|
conf
|
#warming up
EventMachine
.
run
do
sub
=
EventMachine
::
HttpRequest
.
new
(
nginx_address
+
'/sub/'
+
channel
.
to_i
.
to_s
).
get
:head
=>
headers
,
:body
=>
body
...
...
misc/spec/nginx_configuration.rb
View file @
3a4907ae
...
...
@@ -2,8 +2,8 @@ module NginxConfiguration
def
self
.
default_configuration
{
:disable_start_stop_server
=>
false
,
:master_process
=>
'o
ff
'
,
:daemon
=>
'o
ff
'
,
:master_process
=>
'o
n
'
,
:daemon
=>
'o
n
'
,
:content_type
=>
'text/html; charset=utf-8'
,
...
...
@@ -68,7 +68,7 @@ master_process <%= master_process %>;
daemon <%= daemon %>;
worker_processes <%= nginx_workers %>;
worker_rlimit_core 500M;
working_directory <%=
nginx_tests_tmp_dir
%>;
working_directory <%=
File.join(nginx_tests_tmp_dir, "cores", config_id)
%>;
events {
worker_connections 1024;
...
...
misc/spec/spec_helper.rb
View file @
3a4907ae
...
...
@@ -10,9 +10,21 @@ require 'nginx_configuration'
require
'custom_http_matchers'
RSpec
.
configure
do
|
config
|
config
.
before
(
:suite
)
do
FileUtils
.
rm_rf
Dir
[
File
.
join
(
NginxTestHelper
.
nginx_tests_tmp_dir
,
"cores"
,
"**"
)]
end
config
.
before
(
:each
)
do
core_dir
=
File
.
join
(
File
.
join
(
NginxTestHelper
.
nginx_tests_tmp_dir
,
"cores"
,
config_id
))
FileUtils
.
mkdir_p
core_dir
Dir
.
chdir
core_dir
end
config
.
after
(
:each
)
do
NginxTestHelper
::
Config
.
delete_config_and_log_files
(
config_id
)
if
has_passed?
end
config
.
after
(
:suite
)
do
cores
=
Dir
[
File
.
join
(
NginxTestHelper
.
nginx_tests_tmp_dir
,
"cores"
,
"**"
,
"core"
)]
raise
StandardError
.
new
"
\n\n
Core dump(s) at:
\n
#{
cores
.
join
(
"
\n
"
)
}
\n\n
"
unless
cores
.
empty?
end
config
.
order
=
"random"
config
.
include
(
CustomHttpMatchers
)
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