def test_kill_recovery(kill_deployer, kill_deployer_processes, restart_func_dict={}, verify_recovery_dict={}, timeout_dict={}):
  if (kill_deployer is None):
    assert "test_kill_recovery called without any deployer"

  if (kill_deployer_processes is None):
    assert "No process specified for the deployer"

  #stop the deployer's chosen process
  if isinstance(kill_deployer_processes, list):
    kill_process_id = random.choice(kill_deployer_processes)
  else:
    kill_process_id = kill_deployer_processes
  kill_deployer.stop(kill_process_id)


  #Manually restart the process with configs
  if (kill_process_id in restart_func_dict):
    kill_deployer.start(kill_process_id,restart_func_dict[kill_process_id])
  else:
    assert "Restart command not specified for" + kill_process_id

  #verify if the processes has recovered
  if (kill_process_id in verify_recovery_dict):
    start_time = time.time()
    while(not verify_recovery_dict[kill_process_id]()):
      #check for timeout
      if (kill_process_id in timeout_dict):
        assert ((time.time() - start_time) > timeout_dict[kill_process_id]), "Timeout:Killed Process" + kill_process_id + " did not recover correctly"
Updates the database:
dataset/ETHPy150Open linkedin/Zopkio/zopkio/recipes.py/test_kill_recovery--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/share_existing_op.py/ShareExistingOperation._Update