Пример #1
0
    def test_distributed_filter_doc_in_app_config(self):
        os.chdir(os.path.dirname(os.path.abspath(__file__)))

        th.create_app_config_json()
        th.make_applications()
        th.start_monitor()
        th.wait_for_file(self.result_file_1)
        err = th.test_result_file(self.result_file_1)
        self.assertEqual(err, 0)
Пример #2
0
    def test_distributed_filter_doc_param_file(self):
        os.chdir(os.path.dirname(os.path.abspath(__file__)))

        th.create_app_config()
        th.make_applications()
        th.start_monitor([
            'START_MON_ARGS=-P filterDocument=etc/MetricsSource_MonitorOperatorMetrics.json'
        ])
        th.wait_for_file(self.result_file_1)
        err = th.test_result_file(self.result_file_1)
        self.assertEqual(err, 0)
Пример #3
0
    def test_with_two_domains(self):
        os.chdir(os.path.dirname(os.path.abspath(__file__)))

        th.make_applications()
        th.start_monitor()
        th.start_sample()

        # test if monitor app receives notifications
        th.wait_for_file(self.result_file_1)
        err = th.test_result_file(self.result_file_1)
        self.assertEqual(err, 0)

        # force JMX connection failure and monitor app needs to reconnect
        th.stop_test_domain()
        th.start_test_domain()

        th.start_sample()

        # test if monitor app receives notifications
        th.wait_for_file(self.result_file_2)
        err = th.test_result_file(self.result_file_2)
        self.assertEqual(err, 0)