[ 
https://issues.apache.org/jira/browse/IMPALA-12054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17807492#comment-17807492
 ] 

ASF subversion and git services commented on IMPALA-12054:
----------------------------------------------------------

Commit 9ecf0cbfc79cd4ee0b1b0ff9143f3eda20cbdcb4 in impala's branch 
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9ecf0cbfc ]

IMPALA-12054: Lazily check Kudu flags in tests

I usually shutdown Kudu in my dev env to save some resources. However,
tests that import skip.py will fail if Kudu cluster is not running
locally, even if the tests are unrelated to Kudu. The cause is that Kudu
web pages are accessed when the module is imported, and it fails if Kudu
cluster is not running.

This patch exposes the decorators of SkipIfKudu as methods just like
what we did in SkipIfCatalogV2, so Kudu web pages can be checked lazily
when needed.

Tests:
 - Ran Kudu tests.
 - Ran some Kudu unrelated tests without lauching the Kudu cluster.

Change-Id: Ic7a8282b59d72322085c21c70a5019c51b586a52
Reviewed-on: http://gerrit.cloudera.org:8080/20904
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> Some of the non-kudu tests fail if kudu cluster is not running
> --------------------------------------------------------------
>
>                 Key: IMPALA-12054
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12054
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Quanlong Huang
>            Priority: Major
>
> I usually shutdown kudu in my dev env to save some resources. However, tests 
> that use skip.py will fail if kudu cluster is not running locally, even if 
> they are unrelated to Kudu. E.g.
> {code:python}
> $ impala-py.test tests/query_test/test_observability.py -k _end_time
> tests/query_test/test_observability.py:23: in <module>
>     from tests.common.skip import SkipIfFS, SkipIfLocal, 
> SkipIfNotHdfsMinicluster
> tests/common/skip.py:91: in <module>
>     class SkipIfKudu:
> tests/common/skip.py:93: in SkipIfKudu
>     get_kudu_master_flag("--use_hybrid_clock") == "false",
> tests/common/kudu_test_suite.py:61: in get_kudu_master_flag
>     varz = get_kudu_master_webpage("varz")
> tests/common/kudu_test_suite.py:57: in get_kudu_master_webpage
>     return requests.get(url).text
> infra/python/env-gcc10.4.0/lib/python2.7/site-packages/requests/api.py:75: in 
> get
>     return request('get', url, params=params, **kwargs)
> infra/python/env-gcc10.4.0/lib/python2.7/site-packages/requests/api.py:60: in 
> request
>     return session.request(method=method, url=url, **kwargs)
> infra/python/env-gcc10.4.0/lib/python2.7/site-packages/requests/sessions.py:533:
>  in request
>     resp = self.send(prep, **send_kwargs)
> infra/python/env-gcc10.4.0/lib/python2.7/site-packages/requests/sessions.py:646:
>  in send
>     r = adapter.send(request, **kwargs)
> infra/python/env-gcc10.4.0/lib/python2.7/site-packages/requests/adapters.py:516:
>  in send
>     raise ConnectionError(e, request=request)
> E   ConnectionError: HTTPConnectionPool(host='localhost', port=8051): Max 
> retries exceeded with url: /varz (Caused by 
> NewConnectionError('<urllib3.connection.HTTPConnection object at 
> 0x7f774b2ebb50>: Failed to establish a new connection: [Errno 111] Connection 
> refused',))
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to