Removing temporary process group solution. 11/52811/2
authorTomi Juvonen <tomi.juvonen@nokia.com>
Wed, 28 Feb 2018 10:05:26 +0000 (12:05 +0200)
committerRyota Mibu <r-mibu@cq.jp.nec.com>
Wed, 7 Mar 2018 06:48:02 +0000 (06:48 +0000)
Introducing root cause fix for sample inspector shutdown

JIRA: DOCTOR-123

Change-Id: Ibc95d482f476b60584c224d8e2757d071149d611
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
doctor_tests/inspector/sample.py
doctor_tests/main.py

index fadfd3d..abc4fc6 100644 (file)
@@ -168,7 +168,7 @@ class InspectorApp(Thread):
             self.inspector.handle_events(events)
             return "OK"
 
-        @app.route('/shutdown', methods=['POST'])
+        @app.route('/events/shutdown', methods=['POST'])
         def shutdown():
             self.log.info('shutdown inspector app server at %s' % time.time())
             func = request.environ.get('werkzeug.server.shutdown')
index 8051ad6..3f54fc3 100644 (file)
@@ -9,7 +9,6 @@
 import os
 from os.path import isfile, join
 import random
-import signal
 import sys
 import time
 
@@ -258,16 +257,10 @@ class DoctorTest(object):
         self.installer.cleanup()
         self.image.delete()
         self.user.delete()
-        # Kill possible hanging subprocess
-        os.killpg(0, signal.SIGKILL)
 
 
 def main():
     """doctor main"""
-    # TODO (tojuvone): JIRA DOCTOR-123: Test cases have some issue to always
-    # kill all subprocesses. To ensure they are killed this group is done so
-    # all processes can be killed without knowing what they are.
-    os.setpgrp()
     test_dir = os.path.split(os.path.realpath(__file__))[0]
     doctor_root_dir = os.path.dirname(test_dir)