def test_cancellation(self):
   command = "select sleep(10000);"
   p = self._start_new_shell_process()
   self._send_cmd_to_shell(p, command)
   sleep(1)
   # iterate through all processes with psutil
   shell_pid = cancellation_helper()
   sleep(2)
   os.kill(shell_pid, signal.SIGINT)
   result = get_shell_cmd_result(p)
   assert "Cancelling Query" in result.stderr
 def test_cancellation(self):
   command = "select sleep(10000);"
   p = Popen(shlex.split(SHELL_CMD), shell=True, stdout=PIPE, stdin=PIPE, stderr=PIPE)
   p.stdin.write(command + "\n")
   p.stdin.flush()
   sleep(1)
   # iterate through all processes with psutil
   shell_pid = cancellation_helper()
   sleep(2)
   os.kill(shell_pid, signal.SIGINT)
   result = get_shell_cmd_result(p)
   assert "Cancelling Query" in result.stderr
示例#3
0
 def test_cancellation(self):
     impalad = ImpaladService(socket.getfqdn())
     impalad.wait_for_num_in_flight_queries(0)
     command = "select sleep(10000);"
     p = self._start_new_shell_process()
     self._send_cmd_to_shell(p, command)
     sleep(1)
     # iterate through all processes with psutil
     shell_pid = cancellation_helper()
     sleep(2)
     os.kill(shell_pid, signal.SIGINT)
     result = get_shell_cmd_result(p)
     assert impalad.wait_for_num_in_flight_queries(0)
示例#4
0
 def test_cancellation(self):
   impalad = ImpaladService(socket.getfqdn())
   impalad.wait_for_num_in_flight_queries(0)
   command = "select sleep(10000);"
   p = self._start_new_shell_process()
   self._send_cmd_to_shell(p, command)
   sleep(1)
   # iterate through all processes with psutil
   shell_pid = cancellation_helper()
   sleep(2)
   os.kill(shell_pid, signal.SIGINT)
   result = get_shell_cmd_result(p)
   assert impalad.wait_for_num_in_flight_queries(0)
示例#5
0
  def test_cancellation(self):
    """Test cancellation (Ctrl+C event)"""
    args = '-q "select sleep(10000)"'
    cmd = "%s %s" % (SHELL_CMD, args)

    p = Popen(shlex.split(cmd), shell=False, stderr=PIPE, stdout=PIPE)
    sleep(1)
    # iterate through all processes with psutil
    shell_pid = cancellation_helper(args)
    sleep(2)
    os.kill(shell_pid, signal.SIGINT)
    result = get_shell_cmd_result(p)

    assert "Cancelling Query" in result.stderr, result.stderr
 def test_cancellation(self):
     command = "select sleep(10000);"
     p = Popen(shlex.split(SHELL_CMD),
               shell=True,
               stdout=PIPE,
               stdin=PIPE,
               stderr=PIPE)
     p.stdin.write(command + "\n")
     p.stdin.flush()
     sleep(1)
     # iterate through all processes with psutil
     shell_pid = cancellation_helper()
     sleep(2)
     os.kill(shell_pid, signal.SIGINT)
     result = get_shell_cmd_result(p)
     assert "Cancelling Query" in result.stderr