Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
performance
storage
Deimos
Commits
c14b78cd
Commit
c14b78cd
authored
Apr 14, 2020
by
Aaron Dees
Browse files
Merge branch '43-add-stress-test' into 'devel'
Resolve "Add Stress Test" See merge request oilgas/ltfs/fiphoboserver!27
parents
eb025076
6b31b789
Pipeline
#1298
passed with stages
in 6 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/integration_tests/client.py
View file @
c14b78cd
...
...
@@ -3,6 +3,7 @@ import unittest
import
subprocess
import
signal
import
os
from
multiprocessing
import
Process
import
utils.s3_client
as
s3_client
import
utils.compare
as
compare
...
...
@@ -23,6 +24,7 @@ class Server_test_case(unittest.TestCase):
@
classmethod
def
tearDownClass
(
cls
):
os
.
remove
(
cls
.
get_file_name
)
os
.
remove
(
cls
.
get_empty_file_name
)
cls
.
server
.
terminate
()
# kill the fiphoboserver process
...
...
@@ -98,3 +100,40 @@ class Server_test_case(unittest.TestCase):
self
.
assertTrue
(
put_meta_data
==
get_meta_data
)
def
client_process
(
self
):
key
=
random_string
.
random_string
(
'key_'
,
12
)
get_file_name
=
random_string
.
random_string
(
'data/'
,
11
)
self
.
client
.
put
(
self
.
put_file_name
,
self
.
bucket_name
,
key
)
self
.
client
.
get
(
get_file_name
,
self
.
bucket_name
,
key
)
get_meta_data
=
self
.
client
.
get_md
(
self
.
bucket_name
,
key
)
self
.
assertTrue
(
compare
.
files_are_equal
(
self
.
put_file_name
,
get_file_name
)
)
# clean up files
os
.
remove
(
get_file_name
)
return
0
def
test_stress
(
self
):
processes
=
[]
for
i
in
range
(
10
):
process
=
Process
(
target
=
self
.
client_process
())
processes
.
append
(
process
)
process
.
start
()
for
process
in
processes
:
process
.
join
()
Write
Preview
Supports
Markdown
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