소스 검색

HUE-3860 [beeswax] Fix unittest beeswax.tests.test_hiveserver2_jdbc_url

krish 9 년 전
부모
커밋
62615af823
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      apps/beeswax/src/beeswax/tests.py

+ 4 - 1
apps/beeswax/src/beeswax/tests.py

@@ -3381,8 +3381,11 @@ def test_apply_natural_sort():
 
 def test_hiveserver2_jdbc_url():
   try:
+    hostname = socket.getfqdn()
+    beeswax.conf.HIVE_SERVER_HOST.set_for_testing(hostname)
+    beeswax.conf.HIVE_SERVER_PORT.set_for_testing('10000')
     url = hiveserver2_jdbc_url()
-    assert_equal(url, 'jdbc:hive2://localhost:10000/default')
+    assert_equal(url, 'jdbc:hive2://' + hostname + ':10000/default')
 
     beeswax.conf.HIVE_SERVER_HOST.set_for_testing('server-with-ssl-enabled.com')
     beeswax.conf.HIVE_SERVER_PORT.set_for_testing('10000')