Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
 def test_standalone(self):
     os.chdir(os.path.dirname(os.path.abspath(__file__)))
     th.make_applications()
     th.start_sample()
     stdout, stderr, err = th.run_monitor_standalone(args=['user='******'password='******'domainId='+os.environ["STREAMS_DOMAIN_ID"]])
     th.assert_pass(err == 0 and (str(stdout).find('TEST_RESULT_PASS') != -1), stdout, stderr)