فهرست منبع

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')