Exemplo n.º 1
0
    def test_distributed(self):
        os.chdir(os.path.dirname(os.path.abspath(__file__)))

        th.create_app_config()
        th.make_applications()
        th.start_monitor()
        th.start_sample()
        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_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)