소스 검색

[pig] Avoid test hanging

Romain Rigaux 12 년 전
부모
커밋
20a7933
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      apps/pig/src/pig/conf.py

+ 6 - 4
apps/pig/src/pig/conf.py

@@ -16,6 +16,7 @@
 # limitations under the License.
 
 import os
+import sys
 
 from django.utils.translation import ugettext as _, ugettext_lazy as _t
 
@@ -40,9 +41,10 @@ REMOTE_SAMPLE_DIR = Config(
 def config_validator():
   res = []
 
-  status = get_oozie_status()
-
-  if 'NORMAL' not in status:
-    res.append((NICE_NAME, _("The app won't work without a running Oozie server")))
+  if not 'test' in sys.argv: # Avoid tests hanging
+    status = get_oozie_status()
+  
+    if 'NORMAL' not in status:
+      res.append((NICE_NAME, _("The app won't work without a running Oozie server")))
 
   return res