Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
bd53d6b6
Commit
bd53d6b6
authored
May 07, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proftpd/test: make sure we teardown even if error in setup
otherwise we leak zombie slapproxy processes
parent
1fc5a74f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
software/proftpd/test/utils.py
software/proftpd/test/utils.py
+13
-3
No files found.
software/proftpd/test/utils.py
View file @
bd53d6b6
...
...
@@ -68,7 +68,14 @@ class SlapOSInstanceTestCase(unittest.TestCase):
@
classmethod
def
setUpClass
(
cls
):
try
:
cls
.
_setUpClass
()
except
:
cls
.
stopSlapOSProcesses
()
raise
@
classmethod
def
_setUpClass
(
cls
):
working_directory
=
os
.
environ
.
get
(
'SLAPOS_TEST_WORKING_DIR'
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'.slapos'
))
...
...
@@ -158,7 +165,10 @@ class SlapOSInstanceTestCase(unittest.TestCase):
@
classmethod
def
tearDownClas
s
(
cls
):
# FIXME: if setUpClass fail, this is not called and leaks zombie processes
cls
.
_process_manager
.
killPreviousRun
()
def
stopSlapOSProcesse
s
(
cls
):
if
hasattr
(
cls
,
'_process_manager'
):
cls
.
_process_manager
.
killPreviousRun
()
@
classmethod
def
tearDownClass
(
cls
):
cls
.
stopSlapOSProcesses
()
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