Skip to content
Permalink
Browse files

disable unit test when no cluster

  • Loading branch information...
sdpython committed Sep 17, 2016
1 parent 8bbff82 commit 9188def45500257d0b00afd64000d245e792e880
@@ -79,7 +79,8 @@ def test_ls(self):
try:
df = self.client.ls(self.blob_serv, None)
except azure.common.AzureException as e:
warnings.warn("Unable to test azure, storage is still up?\n" + str(e))
warnings.warn(
"Unable to test azure, storage is still up?\n" + str(e))
return
fLOG(df)
assert isinstance(df, pandas.DataFrame)
@@ -115,9 +116,11 @@ def test_upload_download(self):
else:
df = self.client.ls(self.blob_serv, self.container, "unittest")
for name in df["name"]:
self.client.delete_blob(self.blob_serv, self.container, name)
self.client.delete_blob(
self.blob_serv, self.container, name)
except azure.common.AzureException as e:
warnings.warn("Unable to test azure, storage is still up?\n" + str(e))
warnings.warn(
"Unable to test azure, storage is still up?\n" + str(e))
return

content = self.client.ls(self.blob_serv, self.container, "unittest")
@@ -239,9 +242,11 @@ def test_script_pig(self):

import azure.common
try:
content = self.client.ls(self.blob_serv, self.container, "unittest2")
content = self.client.ls(
self.blob_serv, self.container, "unittest2")
except azure.common.AzureException as e:
warnings.warn("Unable to test azure, storage is still up?\n" + str(e))
warnings.warn(
"Unable to test azure, storage is still up?\n" + str(e))
return

if len(content) == 0:
@@ -8,6 +8,7 @@
import os
import unittest
import requests
import warnings
thisfold = os.path.abspath(os.path.split(__file__)[0])
thiscomm = os.path.join(thisfold, "..")
sys.path.append(thiscomm)
@@ -99,11 +100,12 @@ def test_script_hive(self):
f.write(hive)

fLOG("submit")
import azure.common
try:
job = self.client.hive_submit(self.blob_serv, self.container,
hivefile, params=dict(UTT="unittest3"))
except requests.exceptions.ConnectionError:
# cluster not available
except (requests.exceptions.ConnectionError, azure.common.AzureException) as e:
warnings.warn("Cluster not available\n{0}".format(e))
return
fLOG(job)
#not working

0 comments on commit 9188def

Please sign in to comment.
You can’t perform that action at this time.