Explorar o código

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

krish %!s(int64=9) %!d(string=hai) anos
pai
achega
62615af823
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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')