[
https://issues.apache.org/jira/browse/LIVY-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16883767#comment-16883767
]
Yiheng Wang commented on LIVY-582:
--
Just change the upper case characters in your hostname into lower case and the
issue will go.:P
The root cause is the python Request lib will change the request url to lower
case, while the mock lib is case sensitive...
> python test_create_new_session_without_default_config test fails consistently
> -
>
> Key: LIVY-582
> URL: https://issues.apache.org/jira/browse/LIVY-582
> Project: Livy
> Issue Type: Bug
>Affects Versions: 0.6.0
>Reporter: Felix Cheung
>Priority: Major
>
> {code:java}
> test_create_new_session_without_default_config
> def test_create_new_session_without_default_config():
> > mock_and_validate_create_new_session(False)
> src/test/python/livy-tests/client_test.py:105:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> :3: in wrapper
> ???
> src/test/python/livy-tests/client_test.py:48: in
> mock_and_validate_create_new_session
> load_defaults=defaults)
> src/main/python/livy/client.py:88: in __init__
> session_conf_dict).json()['id']
> src/main/python/livy/client.py:388: in _create_new_session
> headers=self._conn._JSON_HEADERS, data=data)
> src/main/python/livy/client.py:500: in send_request
> json=data, auth=self._spnego_auth())
> .eggs/requests-2.21.0-py2.7.egg/requests/api.py:60: in request
> return session.request(method=method, url=url, **kwargs)
> .eggs/requests-2.21.0-py2.7.egg/requests/sessions.py:533: in request
> resp = self.send(prep, **send_kwargs)
> .eggs/requests-2.21.0-py2.7.egg/requests/sessions.py:646: in send
> r = adapter.send(request, **kwargs)
> .eggs/responses-0.10.6-py2.7.egg/responses.py:626: in unbound_on_send
> return self._on_request(adapter, request, *a, **kwargs)
> self =
> adapter =
> request =
> kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout':
> 10, ...}
> match = None, resp_callback = None
> error_msg = "Connection refused by Responses: POST
> http://machine:8998/sessions/ doesn't match Responses Mock"
> response = ConnectionError(u"Connection refused by Responses: POST
> http://machine:8998/sessions/doesn't match Responses Mock",)
> {code}
> Not sure why. this fails 100% and I don't see anything listening to this
> port. Need some help to troubleshoot this.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)