You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/01/25 21:46:21 UTC

[03/11] impala git commit: IMPALA-6318: Revert "Adjustment for hanging query cancellation test"

IMPALA-6318: Revert "Adjustment for hanging query cancellation test"

Jenkins jobs occasionally hang on test_query_cancellation_during_fetch.
There was a workaround proposal submitted under this Jira ID, however,
apparently jobs still hang on this test randomly. Reverting the
workaround and skipping the test until further fix proposal provided.

This reverts commit 7810d1f9a2c7d59b4b916d4d1793672cd8c33143.

Change-Id: I51acee49b5a17c4852410b7568fd1d092b114a6d
Reviewed-on: http://gerrit.cloudera.org:8080/8972
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/2a27b4f4
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/2a27b4f4
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/2a27b4f4

Branch: refs/heads/2.x
Commit: 2a27b4f4788a6cacdf3b69aa60cf179dcfd2d682
Parents: 1bb3547
Author: Gabor Kaszab <ga...@cloudera.com>
Authored: Mon Jan 22 14:21:29 2018 +0100
Committer: Philip Zeyliger <ph...@cloudera.com>
Committed: Wed Jan 24 10:17:56 2018 -0800

----------------------------------------------------------------------
 tests/shell/test_shell_commandline.py |  4 +++-
 tests/shell/util.py                   | 20 ++++++++------------
 2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/2a27b4f4/tests/shell/test_shell_commandline.py
----------------------------------------------------------------------
diff --git a/tests/shell/test_shell_commandline.py b/tests/shell/test_shell_commandline.py
index e4caa99..513abdc 100644
--- a/tests/shell/test_shell_commandline.py
+++ b/tests/shell/test_shell_commandline.py
@@ -329,6 +329,8 @@ class TestImpalaShell(ImpalaTestSuite):
   def test_query_cancellation_during_fetch(self):
     """IMPALA-1144: Test cancellation (CTRL+C) while results are being
     fetched"""
+    pytest.skip("""Skipping as it occasionally gets stuck in Jenkins builds
+                resulting the build to timeout.""")
     # A select query where fetch takes several seconds
     stmt = "with v as (values (1 as x), (2), (3), (4)) " + \
         "select * from v, v v2, v v3, v v4, v v5, v v6, v v7, v v8, " + \
@@ -373,7 +375,7 @@ class TestImpalaShell(ImpalaTestSuite):
     execution in fact starts and then cancels it. Expects the query
     cancellation to succeed."""
     args = "-q \"" + stmt + ";\""
-    p = ImpalaShell(args, omit_stdout=True)
+    p = ImpalaShell(args)
 
     self.wait_for_query_state(stmt, cancel_at_state)
 

http://git-wip-us.apache.org/repos/asf/impala/blob/2a27b4f4/tests/shell/util.py
----------------------------------------------------------------------
diff --git a/tests/shell/util.py b/tests/shell/util.py
index 1fd7601..22ffa1a 100755
--- a/tests/shell/util.py
+++ b/tests/shell/util.py
@@ -130,14 +130,11 @@ class ImpalaShellResult(object):
     self.stderr = str()
 
 class ImpalaShell(object):
-  """A single instance of the Impala shell. The process is started when this object is
+  """A single instance of the Impala shell. The proces is started when this object is
      constructed, and then users should repeatedly call send_cmd(), followed eventually by
      get_result() to retrieve the process output."""
-  def __init__(self, args=None, env=None, omit_stdout=False):
-    self.args = args
-    self.env = env
-    self.omit_stdout = omit_stdout
-    self.shell_process = self._start_new_shell_process()
+  def __init__(self, args=None, env=None):
+    self.shell_process = self._start_new_shell_process(args, env=env)
 
   def pid(self):
     return self.shell_process.pid
@@ -161,12 +158,11 @@ class ImpalaShell(object):
     result.rc = self.shell_process.returncode
     return result
 
-  def _start_new_shell_process(self):
+  def _start_new_shell_process(self, args=None, env=None):
     """Starts a shell process and returns the process handle"""
     shell_args = SHELL_CMD
-    if self.args is not None: shell_args = "%s %s" % (SHELL_CMD, self.args)
+    if args is not None: shell_args = "%s %s" % (SHELL_CMD, args)
     lex = shlex.split(shell_args)
-    if not self.env: self.env = os.environ
-    stdout = open(os.devnull, 'w') if self.omit_stdout else PIPE
-    return Popen(lex, shell=False, stdout=stdout, stdin=PIPE, stderr=PIPE,
-                 env=self.env)
+    if not env: env = os.environ
+    return Popen(lex, shell=False, stdout=PIPE, stdin=PIPE, stderr=PIPE,
+                 env=env)