|
|
@@ -3380,10 +3380,12 @@ def test_apply_natural_sort():
|
|
|
{'name': 'test_200', 'comment': 'Test'}])
|
|
|
|
|
|
def test_hiveserver2_jdbc_url():
|
|
|
- try:
|
|
|
- hostname = socket.getfqdn()
|
|
|
- beeswax.conf.HIVE_SERVER_HOST.set_for_testing(hostname)
|
|
|
+ hostname = socket.getfqdn()
|
|
|
+ resets = [
|
|
|
+ beeswax.conf.HIVE_SERVER_HOST.set_for_testing(hostname),
|
|
|
beeswax.conf.HIVE_SERVER_PORT.set_for_testing('10000')
|
|
|
+ ]
|
|
|
+ try:
|
|
|
url = hiveserver2_jdbc_url()
|
|
|
assert_equal(url, 'jdbc:hive2://' + hostname + ':10000/default')
|
|
|
|
|
|
@@ -3404,6 +3406,8 @@ def test_hiveserver2_jdbc_url():
|
|
|
assert_equal(url, 'jdbc:hive2://server-with-ssl-enabled.com:10000/default')
|
|
|
finally:
|
|
|
beeswax.hive_site.reset()
|
|
|
+ for reset in resets:
|
|
|
+ reset()
|
|
|
|
|
|
|
|
|
|