def test_haproxy_log_file_cmd_average_response_time(self):
     """Check that the average response time returns the expected output."""
     log_file = HaproxyLogFile(
         logfile='haproxy/tests/files/average_response.log',
     )
     log_file.parse_file()
     data = log_file.cmd_average_response_time()
     self.assertEqual(data, 105)
Ejemplo n.º 2
0
 def test_haproxy_log_file_cmd_average_response_time(self):
     """Check that the average response time returns the expected output."""
     log_file = HaproxyLogFile(
         logfile='haproxy/tests/files/average_response.log',
     )
     log_file.parse_file()
     data = log_file.cmd_average_response_time()
     self.assertEqual(data, 105)
 def test_haproxy_log_file_cmd_average_response_time_aborted(self):
     """Check that the average response time returns the expected output
     when there are aborted connections.
     """
     log_file = HaproxyLogFile(
         logfile='haproxy/tests/files/average_response_aborted.log',
     )
     log_file.parse_file()
     data = log_file.cmd_average_response_time()
     self.assertEqual(data, 110)
Ejemplo n.º 4
0
 def test_haproxy_log_file_cmd_average_response_time_no_wait(self):
     """Check that the average response time returns the expected output
     when there are connections that did not take any millisecond to reply.
     """
     log_file = HaproxyLogFile(
         logfile='haproxy/tests/files/average_response_no_wait.log',
     )
     log_file.parse_file()
     data = log_file.cmd_average_response_time()
     self.assertEqual(data, 74)
Ejemplo n.º 5
0
 def test_haproxy_log_file_cmd_average_response_time_aborted(self):
     """Check that the average response time returns the expected output
     when there are aborted connections.
     """
     log_file = HaproxyLogFile(
         logfile='haproxy/tests/files/average_response_aborted.log',
     )
     log_file.parse_file()
     data = log_file.cmd_average_response_time()
     self.assertEqual(data, 110)