Esempio n. 1
0
    def test_reschedule(self):
        test_file_path = os.path.join('ambari_agent', 'dummy_files')
        test_stack_path = os.path.join('ambari_agent', 'dummy_files')

        ash = AlertSchedulerHandler(test_file_path, test_stack_path)
        ash.start()

        self.assertEquals(1, ash.get_job_count())
        ash.reschedule()
        self.assertEquals(1, ash.get_job_count())
Esempio n. 2
0
  def test_reschedule(self):
    test_file_path = os.path.join('ambari_agent', 'dummy_files')
    test_stack_path = os.path.join('ambari_agent', 'dummy_files')
    test_common_services_path = os.path.join('ambari_agent', 'dummy_files')
    test_host_scripts_path = os.path.join('ambari_agent', 'dummy_files')

    cluster_configuration = self.__get_cluster_configuration()

    ash = AlertSchedulerHandler(test_file_path, test_stack_path,
      test_common_services_path, test_host_scripts_path, cluster_configuration,
      None)

    ash.start()

    self.assertEquals(1, ash.get_job_count())
    ash.reschedule()
    self.assertEquals(1, ash.get_job_count())