Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
erp5
Commits
e1679635
Commit
e1679635
authored
May 23, 2018
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability: run scalability command is generated by project testuite
parent
823842e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
+18
-22
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+18
-22
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
e1679635
...
@@ -74,9 +74,6 @@ MAX_CONNECTION_TIME = 60*5
...
@@ -74,9 +74,6 @@ MAX_CONNECTION_TIME = 60*5
# time to check site bootstrap
# time to check site bootstrap
CHECK_BOOSTRAPPING_TIME
=
60
*
2
CHECK_BOOSTRAPPING_TIME
=
60
*
2
# runner names
PERFORMANCE_RUNNER_SCRIPT
=
"performance_tester_erp5"
SCALABILITY_RUNNER_SCRIPT
=
"runScalabilityTestSuite"
REQUEST_URL_SCRIPT
=
"requestUrl"
REQUEST_URL_SCRIPT
=
"requestUrl"
SCALABILITY_TEST
=
"scalability_test"
SCALABILITY_TEST
=
"scalability_test"
TEST_SUITE_INIT
=
"__init__.py"
TEST_SUITE_INIT
=
"__init__.py"
...
@@ -203,7 +200,6 @@ class ScalabilityTestRunner():
...
@@ -203,7 +200,6 @@ class ScalabilityTestRunner():
config
=
self
.
_generateInstanceXML
(
software_configuration
,
config
=
self
.
_generateInstanceXML
(
software_configuration
,
test_result
,
test_suite
,
frontend_software
,
frontend_instance_guid
)
test_result
,
test_suite
,
frontend_software
,
frontend_instance_guid
)
request_kw
=
{
"partition_parameter_kw"
:
{
"_"
:
json
.
dumps
(
config
)}
}
request_kw
=
{
"partition_parameter_kw"
:
{
"_"
:
json
.
dumps
(
config
)}
}
self
.
slapos_communicator
.
requestInstanceStart
(
self
.
instance_title
,
request_kw
)
self
.
slapos_communicator
.
requestInstanceStart
(
self
.
instance_title
,
request_kw
)
self
.
authorize_request
=
False
self
.
authorize_request
=
False
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
...
@@ -386,7 +382,7 @@ Require valid-user
...
@@ -386,7 +382,7 @@ Require valid-user
def
prepareFrontendMasterInstance
(
self
,
computer
,
frontend_software
,
test_suite_title
):
def
prepareFrontendMasterInstance
(
self
,
computer
,
frontend_software
,
test_suite_title
):
if
not
frontend_software
:
if
not
frontend_software
:
return
None
return
None
self
.
frontend_master_reference
=
"Scalability-
Frontend-Master
-"
self
.
frontend_master_reference
=
"Scalability-
Master-Frontend
-"
self
.
frontend_master_reference
+=
"("
+
test_suite_title
+
")-"
self
.
frontend_master_reference
+=
"("
+
test_suite_title
+
")-"
self
.
frontend_master_reference
+=
str
(
computer
).
replace
(
"'"
,
""
)
self
.
frontend_master_reference
+=
str
(
computer
).
replace
(
"'"
,
""
)
restart
=
True
restart
=
True
...
@@ -678,8 +674,6 @@ Require valid-user
...
@@ -678,8 +674,6 @@ Require valid-user
instance_ready
,
error_message
=
self
.
isInstanceReady
(
site_availability_url
)
instance_ready
,
error_message
=
self
.
isInstanceReady
(
site_availability_url
)
if
error_message
:
break
if
error_message
:
break
runner
=
software_bin_directory
+
PERFORMANCE_RUNNER_SCRIPT
scalabilityRunner
=
software_bin_directory
+
SCALABILITY_RUNNER_SCRIPT
slappart_directory
=
self
.
testnode
.
config
[
'srv_directory'
].
rsplit
(
"srv"
,
1
)[
0
]
slappart_directory
=
self
.
testnode
.
config
[
'srv_directory'
].
rsplit
(
"srv"
,
1
)[
0
]
log_path
=
slappart_directory
+
"var/log/"
log_path
=
slappart_directory
+
"var/log/"
try
:
try
:
...
@@ -689,21 +683,23 @@ Require valid-user
...
@@ -689,21 +683,23 @@ Require valid-user
except
Exception
as
e
:
except
Exception
as
e
:
error_message
=
"Error getting current test case information: "
+
str
(
e
)
error_message
=
"Error getting current test case information: "
+
str
(
e
)
break
break
command
=
[
self
.
userhosts_bin
,
try
:
scalabilityRunner
,
command
=
[
self
.
userhosts_bin
]
+
suite
.
getScalabilityRunCommand
(
software_bin_directory
,
"--instance-url"
,
instance_url
,
instance_url
,
"--bootstrap-password"
,
bootstrap_password
,
bootstrap_password
,
"--test-result-path"
,
node_test_suite
.
test_result
.
test_result_path
,
node_test_suite
.
test_result
.
test_result_path
,
"--revision"
,
node_test_suite
.
revision
,
node_test_suite
.
revision
,
"--current-test-data"
,
current_test_data
,
current_test_data
,
"--node-title"
,
self
.
testnode
.
config
[
'test_node_title'
],
self
.
testnode
.
config
[
'test_node_title'
],
"--test-suite-master-url"
,
self
.
testnode
.
config
[
"test_suite_master_url"
],
self
.
testnode
.
config
[
"test_suite_master_url"
],
"--test-suite"
,
node_test_suite
.
test_suite
,
node_test_suite
.
test_suite
,
"--runner-path"
,
runner
,
repo_location
,
"--repo-location"
,
repo_location
,
log_path
,
"--log-path"
,
log_path
,
metric_url
)
"--metric-url"
,
metric_url
except
Exception
as
e
:
]
error_message
=
"Error getting current run scalability command from testsuite: "
+
str
(
e
)
break
logger
.
info
(
"Running test case..."
)
logger
.
info
(
"Running test case..."
)
test_thread
=
TestThread
(
self
.
testnode
.
process_manager
,
command
,
logger
.
info
,
env
=
self
.
exec_env
)
test_thread
=
TestThread
(
self
.
testnode
.
process_manager
,
command
,
logger
.
info
,
env
=
self
.
exec_env
)
test_thread
.
start
()
test_thread
.
start
()
...
...
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