This is an automated email from the ASF dual-hosted git repository. jshao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-livy.git
The following commit(s) were added to refs/heads/master by this push: new f796192 [LIVY-582][TESTS] Hostname in python-api test should be lower case to avoid test failures f796192 is described below commit f7961924e4bed4d1257817cd871bfe0555d1cca0 Author: Yiheng Wang <yihe...@gmail.com> AuthorDate: Tue Jul 16 10:22:11 2019 +0800 [LIVY-582][TESTS] Hostname in python-api test should be lower case to avoid test failures ## What changes were proposed in this pull request? In the python-API test code, when returning a mocked response, the mock lib will compare the URL with the predefined URLs case sensitive. However, the `Request` lib used in the Livy python API will change the URL to lower case. This will cause test failures on a machine with an upper case hostname. This patch turns the hostname in python-API test code into the lower case to avoid such test failures. ## How was this patch tested? Existing test. Run test specifically on a machine with an upper case hostname. Author: Yiheng Wang <yihe...@gmail.com> Closes #180 from yiheng/fix_582. --- python-api/src/test/python/livy-tests/client_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-api/src/test/python/livy-tests/client_test.py b/python-api/src/test/python/livy-tests/client_test.py index 5e47cb0..b6426ae 100644 --- a/python-api/src/test/python/livy-tests/client_test.py +++ b/python-api/src/test/python/livy-tests/client_test.py @@ -26,7 +26,8 @@ from livy.client import HttpClient session_id = 0 job_id = 1 -base_uri = 'http://{0}:{1}'.format(socket.gethostname(), 8998) +# Make sure host name is lower case. See LIVY-582 +base_uri = 'http://{0}:{1}'.format(socket.gethostname().lower(), 8998) client_test = None invoked_queued_callback = False invoked_running_callback = False