ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-15668. ambari-agent Build Reports SUCCESS Even When Tests Fail.(vbrodetskyi)
Date Fri, 01 Apr 2016 14:38:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6b8b74366 -> f88f9f356


AMBARI-15668. ambari-agent Build Reports SUCCESS Even When Tests Fail.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: f88f9f3567c44ffa405209a0b26020f06e167cf2
Parents: 6b8b743
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Fri Apr 1 17:38:22 2016 +0300
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Fri Apr 1 17:38:22 2016 +0300

----------------------------------------------------------------------
 .../test/python/ambari_agent/TestActionQueue.py |  2 +-
 .../test/python/ambari_agent/TestHeartbeat.py   |  5 +-
 .../src/test/python/ambari_agent/TestMain.py    | 45 +++++++-----
 .../python/ambari_agent/TestRecoveryManager.py  | 73 ++++++++++----------
 4 files changed, 70 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f88f9f35/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
index 56ba263..8bd5ddc 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py
@@ -380,7 +380,7 @@ class TestActionQueue(TestCase):
     config.set('agent', 'tolerate_download_failures', "true")
     dummy_controller = MagicMock()
     dummy_controller.recovery_manager = RecoveryManager(tempfile.mktemp())
-    dummy_controller.recovery_manager.update_config(5, 5, 1, 11, True, False, "")
+    dummy_controller.recovery_manager.update_config(5, 5, 1, 11, True, False, "", -1)
 
     actionQueue = ActionQueue(config, dummy_controller)
     unfreeze_flag = threading.Event()

http://git-wip-us.apache.org/repos/asf/ambari/blob/f88f9f35/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py b/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py
index 12e78c2..f113083 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py
@@ -57,6 +57,7 @@ class TestHeartbeat(TestCase):
     config.set('agent', 'cache_dir', "/var/lib/ambari-agent/cache")
     config.set('agent', 'tolerate_download_failures', "true")
     dummy_controller = MagicMock()
+    dummy_controller.recovery_manager.recovery_timestamp = -1
     actionQueue = ActionQueue(config, dummy_controller)
     heartbeat = Heartbeat(actionQueue)
     result = heartbeat.build(100)
@@ -66,11 +67,12 @@ class TestHeartbeat(TestCase):
     self.assertEquals(result['componentStatus'] is not None, True, "Heartbeat should contain
componentStatus")
     self.assertEquals(result['reports'] is not None, True, "Heartbeat should contain reports")
     self.assertEquals(result['timestamp'] >= 1353679373880L, True)
+    self.assertEquals(result['recoveryTimestamp'], -1)
     self.assertEquals(len(result['nodeStatus']), 2)
     self.assertEquals(result['nodeStatus']['cause'], "NONE")
     self.assertEquals(result['nodeStatus']['status'], "HEALTHY")
     # result may or may NOT have an agentEnv structure in it
-    self.assertEquals((len(result) is 6) or (len(result) is 7), True)
+    self.assertEquals((len(result) is 7) or (len(result) is 8), True)
     self.assertEquals(not heartbeat.reports, True, "Heartbeat should not contain task in
progress")
 
   @patch("subprocess.Popen")
@@ -174,6 +176,7 @@ class TestHeartbeat(TestCase):
                   {'status': 'HEALTHY',
                    'cause': 'NONE'},
                 'recoveryReport': {'summary': 'DISABLED'},
+                'recoveryTimestamp': -1,
                 'timestamp': 'timestamp', 'hostname': 'hostname',
                 'responseId': 10, 'reports': [
       {'status': 'IN_PROGRESS', 'roleCommand': u'INSTALL',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f88f9f35/ambari-agent/src/test/python/ambari_agent/TestMain.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestMain.py b/ambari-agent/src/test/python/ambari_agent/TestMain.py
index 477520e..c7cfb0a 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestMain.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestMain.py
@@ -31,7 +31,7 @@ import ambari_agent.hostname as hostname
 from ambari_commons import OSCheck
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from only_for_platform import get_platform, not_for_platform, os_distro_value, PLATFORM_WINDOWS
-from mock.mock import MagicMock, patch, ANY, Mock
+from mock.mock import MagicMock, patch, ANY, Mock, call
 
 with patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value)):
   from ambari_agent import NetUtil, security
@@ -200,9 +200,8 @@ class TestMain(unittest.TestCase):
   @not_for_platform(PLATFORM_WINDOWS)
   @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch("time.sleep")
-  @patch("sys.exit")
   @patch("os.path.exists")
-  def test_daemonize_and_stop(self, exists_mock, sys_exit_mock, sleep_mock):
+  def test_daemonize_and_stop(self, exists_mock, sleep_mock):
     from ambari_commons.shell import shellRunnerLinux
 
     oldpid = ProcessHelper.pidfile
@@ -215,25 +214,39 @@ class TestMain(unittest.TestCase):
     saved = open(ProcessHelper.pidfile, 'r').read()
     self.assertEqual(pid, saved)
 
+    main.GRACEFUL_STOP_TRIES = 1
     with patch("ambari_commons.shell.shellRunnerLinux.run") as kill_mock:
       # Reuse pid file when testing agent stop
       # Testing normal exit
       exists_mock.return_value = False
-      main.stop_agent()
-      kill_mock.assert_called_with(['ambari-sudo.sh', 'kill', '-15', pid])
-      sys_exit_mock.assert_called_with(0)
+      kill_mock.side_effect = [{'exitCode': 0, 'output': '', 'error': ''},
+                               {'exitCode': 1, 'output': '', 'error': ''}]
+      try:
+        main.stop_agent()
+        raise Exception("main.stop_agent() should raise sys.exit(0).")
+      except SystemExit as e:
+        self.assertEquals(0, e.code);
+
+      kill_mock.assert_has_calls([call(['ambari-sudo.sh', 'kill', '-15', pid]),
+                                 call(['ambari-sudo.sh', 'kill', '-0', pid])])
 
       # Restore
       kill_mock.reset_mock()
-      sys_exit_mock.reset_mock()
-      kill_mock.return_value = {'exitCode': 0, 'output': 'out', 'error': 'err'}
+      kill_mock.side_effect = [{'exitCode': 0, 'output': '', 'error': ''},
+                               {'exitCode': 0, 'output': '', 'error': ''},
+                               {'exitCode': 0, 'output': '', 'error': ''}]
 
       # Testing exit when failed to remove pid file
       exists_mock.return_value = True
-      main.stop_agent()
-      kill_mock.assert_any_call(['ambari-sudo.sh', 'kill', '-15', pid])
-      kill_mock.assert_any_call(['ambari-sudo.sh', 'kill', '-9', pid])
-      sys_exit_mock.assert_called_with(0)
+      try:
+        main.stop_agent()
+        raise Exception("main.stop_agent() should raise sys.exit(0).")
+      except SystemExit as e:
+        self.assertEquals(0, e.code);
+
+      kill_mock.assert_has_calls([call(['ambari-sudo.sh', 'kill', '-15', pid]),
+                                  call(['ambari-sudo.sh', 'kill', '-0', pid]),
+                                  call(['ambari-sudo.sh', 'kill', '-9', pid])])
 
     # Restore
     ProcessHelper.pidfile = oldpid
@@ -313,7 +326,8 @@ class TestMain(unittest.TestCase):
   @patch.object(PingPortListener,"start")
   @patch.object(PingPortListener,"__init__")
   @patch.object(ExitHelper,"execute_cleanup")
-  def test_main(self, cleanup_mock, ping_port_init_mock, ping_port_start_mock, data_clean_init_mock,data_clean_start_mock,
+  @patch.object(ExitHelper, "exit")
+  def test_main(self, exithelper_exit_mock, cleanup_mock, ping_port_init_mock, ping_port_start_mock,
data_clean_init_mock,data_clean_start_mock,
                 parse_args_mock, start_mock, Controller_is_alive_mock, Controller_init_mock,
try_to_connect_mock,
                 update_log_level_mock, daemonize_mock, perform_prestart_checks_mock,
                 ambari_config_mock,
@@ -333,8 +347,6 @@ class TestMain(unittest.TestCase):
     main.main()
 
     self.assertTrue(setup_logging_mock.called)
-    if OSCheck.get_os_family() != OSConst.WINSRV_FAMILY:
-      self.assertTrue(stop_mock.called)
     self.assertTrue(perform_prestart_checks_mock.called)
     if OSCheck.get_os_family() != OSConst.WINSRV_FAMILY:
       self.assertTrue(daemonize_mock.called)
@@ -345,8 +357,7 @@ class TestMain(unittest.TestCase):
     self.assertTrue(data_clean_start_mock.called)
     self.assertTrue(ping_port_init_mock.called)
     self.assertTrue(ping_port_start_mock.called)
-    if not OSCheck.get_os_family() == OSConst.WINSRV_FAMILY:
-      self.assertTrue(cleanup_mock.called)
+    self.assertTrue(exithelper_exit_mock.called)
     perform_prestart_checks_mock.reset_mock()
 
     # Testing call with --expected-hostname parameter

http://git-wip-us.apache.org/repos/asf/ambari/blob/f88f9f35/ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py b/ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py
index ef81704..ae661d7 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py
@@ -141,7 +141,7 @@ class _TestRecoveryManager(TestCase):
 
     mock_uds.reset_mock()
 
-    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER")
+    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER", -1)
     rm.process_execution_commands([self.exec_command1, self.exec_command2, self.exec_command3])
     mock_uds.assert_has_calls([call("NODEMANAGER", "INSTALLED")], [call("NODEMANAGER", "STARTED")])
 
@@ -174,29 +174,29 @@ class _TestRecoveryManager(TestCase):
     rm = RecoveryManager(tempfile.mktemp(), True, False)
     self.assertTrue(rm.enabled())
 
-    config = rm.update_config(0, 60, 5, 12, True, False, "")
+    config = rm.update_config(0, 60, 5, 12, True, False, "", -1)
     self.assertFalse(rm.enabled())
 
-    rm.update_config(6, 60, 5, 12, True, False, "")
+    rm.update_config(6, 60, 5, 12, True, False, "", -1)
     self.assertTrue(rm.enabled())
 
-    rm.update_config(6, 0, 5, 12, True, False, "")
+    rm.update_config(6, 0, 5, 12, True, False, "", -1)
     self.assertFalse(rm.enabled())
 
-    rm.update_config(6, 60, 0, 12, True, False, "")
+    rm.update_config(6, 60, 0, 12, True, False, "", -1)
     self.assertFalse(rm.enabled())
 
-    rm.update_config(6, 60, 1, 12, True, False, None)
+    rm.update_config(6, 60, 1, 12, True, False, None, -1)
     self.assertTrue(rm.enabled())
 
-    rm.update_config(6, 60, 61, 12, True, False, None)
+    rm.update_config(6, 60, 61, 12, True, False, None, -1)
     self.assertFalse(rm.enabled())
 
-    rm.update_config(6, 60, 5, 4, True, False, "")
+    rm.update_config(6, 60, 5, 4, True, False, "", -1)
     self.assertFalse(rm.enabled())
 
     # maximum 2 in 2 minutes and at least 1 minute wait
-    rm.update_config(2, 5, 1, 4, True, False, "")
+    rm.update_config(2, 5, 1, 4, True, False, "", -1)
     self.assertTrue(rm.enabled())
 
     # T = 1000-2
@@ -222,7 +222,7 @@ class _TestRecoveryManager(TestCase):
     self.assertFalse(rm.may_execute("NODEMANAGER"))  # too soon
 
     # maximum 2 in 2 minutes and no min wait
-    rm.update_config(2, 5, 1, 5, True, True, "")
+    rm.update_config(2, 5, 1, 5, True, True, "", -1)
 
     # T = 1500-3
     self.assertTrue(rm.execute("NODEMANAGER2"))
@@ -242,7 +242,7 @@ class _TestRecoveryManager(TestCase):
 
   def test_recovery_required(self):
     rm = RecoveryManager(tempfile.mktemp(), True, False)
-    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER")
+    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "INSTALLED")
     self.assertFalse(rm.requires_recovery("NODEMANAGER"))
@@ -290,13 +290,13 @@ class _TestRecoveryManager(TestCase):
   def test_recovery_required2(self):
 
     rm = RecoveryManager(tempfile.mktemp(), True, True)
-    rm.update_config(15, 5, 1, 16, True, False, "NODEMANAGER")
+    rm.update_config(15, 5, 1, 16, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "STARTED")
     self.assertTrue(rm.requires_recovery("NODEMANAGER"))
 
     rm = RecoveryManager(tempfile.mktemp(), True, True)
-    rm.update_config(15, 5, 1, 16, True, False, "NODEMANAGER")
+    rm.update_config(15, 5, 1, 16, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "STARTED")
     self.assertTrue(rm.requires_recovery("NODEMANAGER"))
@@ -306,7 +306,7 @@ class _TestRecoveryManager(TestCase):
     self.assertFalse(rm.requires_recovery("DATANODE"))
 
     rm = RecoveryManager(tempfile.mktemp(), True, True)
-    rm.update_config(15, 5, 1, 16, True, False, "")
+    rm.update_config(15, 5, 1, 16, True, False, "", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "STARTED")
     self.assertFalse(rm.requires_recovery("NODEMANAGER"))
@@ -315,7 +315,7 @@ class _TestRecoveryManager(TestCase):
     rm.update_desired_status("DATANODE", "STARTED")
     self.assertFalse(rm.requires_recovery("DATANODE"))
 
-    rm.update_config(15, 5, 1, 16, True, False, "NODEMANAGER")
+    rm.update_config(15, 5, 1, 16, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "STARTED")
     self.assertTrue(rm.requires_recovery("NODEMANAGER"))
@@ -380,12 +380,12 @@ class _TestRecoveryManager(TestCase):
        4200, 4201, 4202,
        4300, 4301, 4302]
     rm = RecoveryManager(tempfile.mktemp(), True)
-    rm.update_config(15, 5, 1, 16, True, False, "")
+    rm.update_config(15, 5, 1, 16, True, False, "", -1)
 
     command1 = copy.deepcopy(self.command)
 
     rm.store_or_update_command(command1)
-    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER")
+    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "STARTED")
     self.assertEqual("INSTALLED", rm.get_current_status("NODEMANAGER"))
@@ -411,14 +411,14 @@ class _TestRecoveryManager(TestCase):
     self.assertEqual(1, len(commands))
     self.assertEqual("INSTALL", commands[0]["roleCommand"])
 
-    rm.update_config(2, 5, 1, 5, True, True, "")
+    rm.update_config(2, 5, 1, 5, True, True, "", -1)
     rm.update_current_status("NODEMANAGER", "INIT")
     rm.update_desired_status("NODEMANAGER", "INSTALLED")
 
     commands = rm.get_recovery_commands()
     self.assertEqual(0, len(commands))
 
-    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER")
+    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INIT")
     rm.update_desired_status("NODEMANAGER", "INSTALLED")
 
@@ -459,25 +459,25 @@ class _TestRecoveryManager(TestCase):
   def test_update_rm_config(self, mock_uc):
     rm = RecoveryManager(tempfile.mktemp())
     rm.update_configuration_from_registration(None)
-    mock_uc.assert_has_calls([call(6, 60, 5, 12, False, True, "")])
+    mock_uc.assert_has_calls([call(6, 60, 5, 12, False, True, "", -1)])
 
     mock_uc.reset_mock()
     rm.update_configuration_from_registration({})
-    mock_uc.assert_has_calls([call(6, 60, 5, 12, False, True, "")])
+    mock_uc.assert_has_calls([call(6, 60, 5, 12, False, True, "", -1)])
 
     mock_uc.reset_mock()
     rm.update_configuration_from_registration(
       {"recoveryConfig": {
       "type" : "DEFAULT"}}
     )
-    mock_uc.assert_has_calls([call(6, 60, 5, 12, False, True, "")])
+    mock_uc.assert_has_calls([call(6, 60, 5, 12, False, True, "", -1)])
 
     mock_uc.reset_mock()
     rm.update_configuration_from_registration(
       {"recoveryConfig": {
         "type" : "FULL"}}
     )
-    mock_uc.assert_has_calls([call(6, 60, 5, 12, True, False, "")])
+    mock_uc.assert_has_calls([call(6, 60, 5, 12, True, False, "", -1)])
 
     mock_uc.reset_mock()
     rm.update_configuration_from_registration(
@@ -485,7 +485,7 @@ class _TestRecoveryManager(TestCase):
         "type" : "AUTO_START",
         "max_count" : "med"}}
     )
-    mock_uc.assert_has_calls([call(6, 60, 5, 12, True, True, "")])
+    mock_uc.assert_has_calls([call(6, 60, 5, 12, True, True, "", -1)])
 
     mock_uc.reset_mock()
     rm.update_configuration_from_registration(
@@ -495,9 +495,10 @@ class _TestRecoveryManager(TestCase):
         "windowInMinutes" : 20,
         "retryGap" : 2,
         "maxLifetimeCount" : 5,
-        "components" : " A,B"}}
+        "components" : " A,B",
+        "recoveryTimestamp" : 1}}
     )
-    mock_uc.assert_has_calls([call(5, 20, 2, 5, True, True, " A,B")])
+    mock_uc.assert_has_calls([call(5, 20, 2, 5, True, True, " A,B", 1)])
   pass
 
   @patch.object(RecoveryManager, "_now_")
@@ -509,7 +510,7 @@ class _TestRecoveryManager(TestCase):
     rec_st = rm.get_recovery_status()
     self.assertEquals(rec_st, {"summary": "DISABLED"})
 
-    rm.update_config(2, 5, 1, 4, True, True, "")
+    rm.update_config(2, 5, 1, 4, True, True, "", -1)
     rec_st = rm.get_recovery_status()
     self.assertEquals(rec_st, {"summary": "RECOVERABLE", "componentReports": []})
 
@@ -553,12 +554,12 @@ class _TestRecoveryManager(TestCase):
       [1000, 1001, 1002, 1003, 1104, 1105, 1106, 1807, 1808, 1809, 1810, 1811, 1812]
 
     rm = RecoveryManager(tempfile.mktemp(), True)
-    rm.update_config(5, 5, 1, 11, True, False, "")
+    rm.update_config(5, 5, 1, 11, True, False, "", -1)
 
     command1 = copy.deepcopy(self.command)
 
     rm.store_or_update_command(command1)
-    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER")
+    rm.update_config(12, 5, 1, 15, True, False, "NODEMANAGER", -1)
     rm.update_current_status("NODEMANAGER", "INSTALLED")
     rm.update_desired_status("NODEMANAGER", "STARTED")
 
@@ -594,24 +595,24 @@ class _TestRecoveryManager(TestCase):
 
   def test_configured_for_recovery(self):
     rm = RecoveryManager(tempfile.mktemp(), True)
-    rm.update_config(12, 5, 1, 15, True, False, "A,B")
+    rm.update_config(12, 5, 1, 15, True, False, "A,B", -1)
     self.assertTrue(rm.configured_for_recovery("A"))
     self.assertTrue(rm.configured_for_recovery("B"))
 
-    rm.update_config(5, 5, 1, 11, True, False, "")
+    rm.update_config(5, 5, 1, 11, True, False, "", -1)
     self.assertFalse(rm.configured_for_recovery("A"))
     self.assertFalse(rm.configured_for_recovery("B"))
 
-    rm.update_config(5, 5, 1, 11, True, False, "A")
+    rm.update_config(5, 5, 1, 11, True, False, "A", -1)
     self.assertTrue(rm.configured_for_recovery("A"))
     self.assertFalse(rm.configured_for_recovery("B"))
 
-    rm.update_config(5, 5, 1, 11, True, False, "A")
+    rm.update_config(5, 5, 1, 11, True, False, "A", -1)
     self.assertTrue(rm.configured_for_recovery("A"))
     self.assertFalse(rm.configured_for_recovery("B"))
     self.assertFalse(rm.configured_for_recovery("C"))
 
-    rm.update_config(5, 5, 1, 11, True, False, "A, D, F ")
+    rm.update_config(5, 5, 1, 11, True, False, "A, D, F ", -1)
     self.assertTrue(rm.configured_for_recovery("A"))
     self.assertFalse(rm.configured_for_recovery("B"))
     self.assertFalse(rm.configured_for_recovery("C"))
@@ -625,7 +626,7 @@ class _TestRecoveryManager(TestCase):
       [1000, 1071, 1372]
     rm = RecoveryManager(tempfile.mktemp(), True)
 
-    rm.update_config(2, 5, 1, 4, True, True, "")
+    rm.update_config(2, 5, 1, 4, True, True, "", -1)
 
     rm.execute("COMPONENT")
     actions = rm.get_actions_copy()["COMPONENT"]
@@ -643,7 +644,7 @@ class _TestRecoveryManager(TestCase):
   def test_is_action_info_stale(self, time_mock):
 
     rm = RecoveryManager(tempfile.mktemp(), True)
-    rm.update_config(5, 60, 5, 16, True, False, "")
+    rm.update_config(5, 60, 5, 16, True, False, "", -1)
 
     time_mock.return_value = 0
     self.assertFalse(rm.is_action_info_stale("COMPONENT_NAME"))


Mime
View raw message