Skip to content

Commit

Permalink
IMPALA-4751: Remove blank line from raw_text template
Browse files Browse the repository at this point in the history
The additional blank line can break tooling which uses the
/query_profile_encoded endpoint and has been erroneously introduced in
the fix for IMPALA-3918.

Change-Id: I9b688aa9e2423b0271c8891a983e5b22707d8dbc
Reviewed-on: http://gerrit.cloudera.org:8080/5664
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins
  • Loading branch information
Lars Volker authored and Harrison Sheinblatt committed Jan 10, 2017
1 parent 9a97b80 commit a0b9b43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions tests/webserver/test_web_pages.py
Expand Up @@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from tests.common.impala_cluster import ImpalaCluster
from tests.common.impala_test_suite import ImpalaTestSuite
import requests

Expand All @@ -28,3 +29,14 @@ def test_memz(self):
assert page.status_code == requests.codes.ok
page = requests.get("http://localhost:25020/memz")
assert page.status_code == requests.codes.ok

def test_query_profile_encoded_unknown_query_id(self):
"""Test that /query_profile_encoded error message starts with the expected line in
case of missing query and does not contain any leading whitespace.
"""
cluster = ImpalaCluster()
impalad = cluster.get_any_impalad()
result = impalad.service.read_debug_webpage("query_profile_encoded?query_id=123")
assert result.startswith("Could not obtain runtime profile: Query id")


6 changes: 4 additions & 2 deletions www/raw_text.tmpl
Expand Up @@ -15,5 +15,7 @@ software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
}}
{{contents}}
}}{{!
When making changes to this file, please make sure to not introduce any whitespace before
the main content, or it may break tools relying on the content starting on the first line.
}}{{contents}}

0 comments on commit a0b9b43

Please sign in to comment.