浏览代码

[beeswax] Use FQDN for the test server

Romain Rigaux 12 年之前
父节点
当前提交
e43e370
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      apps/beeswax/src/beeswax/test_base.py
  2. 1 1
      desktop/core/src/desktop/lib/security_util.py

+ 2 - 1
apps/beeswax/src/beeswax/test_base.py

@@ -29,6 +29,7 @@ from django.contrib.auth.models import User
 
 
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.django_test_util import make_logged_in_client
 from desktop.lib.paths import get_run_root
 from desktop.lib.paths import get_run_root
+from desktop.lib.security_util import get_localhost_name
 from hadoop import pseudo_hdfs4
 from hadoop import pseudo_hdfs4
 
 
 import beeswax.conf
 import beeswax.conf
@@ -86,7 +87,7 @@ def get_shared_beeswax_server():
 
 
     HIVE_CONF = cluster.hadoop_conf_dir
     HIVE_CONF = cluster.hadoop_conf_dir
     finish = (
     finish = (
-      beeswax.conf.HIVE_SERVER_HOST.set_for_testing("localhost"),
+      beeswax.conf.HIVE_SERVER_HOST.set_for_testing(get_localhost_name()),
       beeswax.conf.HIVE_SERVER_PORT.set_for_testing(HIVE_SERVER_TEST_PORT),
       beeswax.conf.HIVE_SERVER_PORT.set_for_testing(HIVE_SERVER_TEST_PORT),
       beeswax.conf.HIVE_SERVER_BIN.set_for_testing(get_run_root('ext/hive/hive') + '/bin/hiveserver2'),
       beeswax.conf.HIVE_SERVER_BIN.set_for_testing(get_run_root('ext/hive/hive') + '/bin/hiveserver2'),
       beeswax.conf.HIVE_CONF_DIR.set_for_testing(HIVE_CONF)
       beeswax.conf.HIVE_CONF_DIR.set_for_testing(HIVE_CONF)

+ 1 - 1
desktop/core/src/desktop/lib/security_util.py

@@ -63,4 +63,4 @@ def get_fqdn(hostname_or_ip):
   if fqdn == 'localhost':
   if fqdn == 'localhost':
     fqdn = get_localhost_name()
     fqdn = get_localhost_name()
 
 
-  return fqdn
+  return fqdn