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/12/27 22:24:41 UTC
[3/3] impala git commit: IMPALA-7648: add tests for OOM from scanning
big string
IMPALA-7648: add tests for OOM from scanning big string
This extends test_insert_large_string to exercise the OOM code path.
Change-Id: I0d1e9b2e8cf6e167da2542950ae90717d4865e9b
Reviewed-on: http://gerrit.cloudera.org:8080/12123
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/11a48234
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/11a48234
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/11a48234
Branch: refs/heads/master
Commit: 11a48234ec61431bf88e1395997bdb90762ba4e3
Parents: e4facae
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Wed Dec 26 11:12:53 2018 -0800
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Thu Dec 27 22:23:40 2018 +0000
----------------------------------------------------------------------
tests/query_test/test_insert.py | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/11a48234/tests/query_test/test_insert.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_insert.py b/tests/query_test/test_insert.py
index 5e43fa1..ecb1a8e 100644
--- a/tests/query_test/test_insert.py
+++ b/tests/query_test/test_insert.py
@@ -107,6 +107,16 @@ class TestInsertQueries(ImpalaTestSuite):
"select substr(s, 200 * 1024 * 1024, 5) from {0}".format(table_name))
assert result.data == ["ZAZAZ"]
+ # IMPALA-7648: test that we gracefully fail when there is not enough memory
+ # to fit the scanned string in memory.
+ self.client.set_configuration_option("mem_limit", "50M")
+ try:
+ self.client.execute("select s from {0}".format(table_name))
+ assert False, "Expected query to fail"
+ except Exception, e:
+ assert "Memory limit exceeded" in str(e)
+
+
@classmethod
def setup_class(cls):
super(TestInsertQueries, cls).setup_class()