Cleanup

Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/adc6aab3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/adc6aab3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/adc6aab3

Branch: refs/heads/master
Commit: adc6aab343ea2432d47b902ae6fdd60d5babbf05
Parents: 04c3ab6
Author: Thomas Jackson <[email protected]>
Authored: Tue Jan 6 14:57:19 2015 -0800
Committer: Thomas Jackson <[email protected]>
Committed: Tue Jan 6 14:57:19 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 6 +++---
 tsqa/test_cases.py  | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/adc6aab3/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index 7574930..24d432f 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -243,7 +243,6 @@ class Environment:
                                         )
             tsqa.utils.poll_interfaces(self.hostports)
 
-            # TODO: better checking...
             self.cop.poll()
             if self.cop.returncode is not None:
                 raise Exception(self.cop.returncode, self.layout.prefix)
@@ -254,6 +253,7 @@ class Environment:
         """
         self.log = logging.getLogger(__name__)
         self.cop = None
+        # TODO: parse config? Don't like the separate hostports...
         self.hostports = []
         if layout:
             self.layout = layout
@@ -336,8 +336,8 @@ class Environment:
         self.__exec_cop()
         self.log.debug("Started traffic cop: %s", self.cop)
 
+    # TODO: exception if already stopped?
     # TODO: more graceful stop?
-    # TODO: raise exception when you call stop when its not started?
     def stop(self):
         self.log.debug("Killing traffic cop: %s", self.cop)
         if self.cop is not None:
@@ -348,7 +348,7 @@ class Environment:
         if self.cop is None:
             return False
         self.cop.poll()
-        return self.cop is not None and self.cop.returncode is not None  # its 
running if it hasn't died
+        return self.cop.returncode is not None  # its running if it hasn't died
 
     # TODO: only do this on success, instead of __del__?
     def __del__(self):

http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/adc6aab3/tsqa/test_cases.py
----------------------------------------------------------------------
diff --git a/tsqa/test_cases.py b/tsqa/test_cases.py
index 9ee81f9..e4d7490 100644
--- a/tsqa/test_cases.py
+++ b/tsqa/test_cases.py
@@ -79,7 +79,6 @@ class EnvironmentCase(unittest.TestCase):
         if cls.environment.cop is not None and not cls.environment.running:
             raise Exception('ATS died during the test run')
         # stop ATS
-
         cls.environment.stop()
 
         # call parent destructor

Reply via email to