fix Agent.abort() when it's called before the agent has started (in that case, it should do nothing -- but the logic was making it basically ignore the abort).  this should fix jobs being aborting in the "starting" phase (a phase that lasts one cycle before "running" starts).

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3060 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/monitor_db_unittest.py b/scheduler/monitor_db_unittest.py
index c56cb0d..5b6f80b 100644
--- a/scheduler/monitor_db_unittest.py
+++ b/scheduler/monitor_db_unittest.py
@@ -1297,6 +1297,15 @@
         self._test_agent_abort_helper(True)
 
 
+    def test_agent_abort_before_started(self):
+        task = self._create_mock_task('task')
+        agent = self._create_agent([task])
+        agent.abort()
+        agent.start()
+        self._finish_agent(agent)
+        self.god.check_playback()
+
+
 class AgentTasksTest(unittest.TestCase):
     TEMP_DIR = '/abspath/tempdir'
     RESULTS_DIR = '/results/dir'