浏览代码

HUE-5058 [metastore] Skip test_read_partitions unless in live cluster mode

spaztic1215 9 年之前
父节点
当前提交
cbd4060
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      apps/metastore/src/metastore/tests.py

+ 4 - 0
apps/metastore/src/metastore/tests.py

@@ -20,6 +20,7 @@ import json
 import logging
 import urllib
 
+from nose.plugins.skip import SkipTest
 from nose.tools import assert_true, assert_equal, assert_false
 
 from django.utils.encoding import smart_str
@@ -195,6 +196,9 @@ class TestMetastoreWithHadoop(BeeswaxSampleProvider):
       finish()
 
   def test_read_partitions(self):
+    if not is_live_cluster():
+      raise SkipTest
+
     partition_spec = "baz='baz_one',boom='boom_two'"
     response = self.client.get("/metastore/table/%s/test_partitions/partitions/%s/read" % (self.db_name, partition_spec), follow=True)
     response = self.client.get(reverse("beeswax:api_watch_query_refresh_json", kwargs={'id': response.context['query'].id}), follow=True)