You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ga...@apache.org on 2015/06/03 11:49:51 UTC
git commit: updated refs/heads/master to 9c2a1ea
Repository: cloudstack
Updated Branches:
refs/heads/master b31b8425d -> 9c2a1ea81
CLOUDSTACK-8532: Modification in setupClass to skip testcases rather than throwing an exception on "Exceeding connection limit to Netscaler device"
Signed-off-by: Gaurav Aradhye <ga...@clogeny.com>
This closes #343
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9c2a1ea8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9c2a1ea8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9c2a1ea8
Branch: refs/heads/master
Commit: 9c2a1ea81e38f9aad49adafcbe98f80716816e1a
Parents: b31b842
Author: pritisarap12 <pr...@clogeny.com>
Authored: Tue Jun 2 11:04:34 2015 +0530
Committer: Gaurav Aradhye <ga...@clogeny.com>
Committed: Wed Jun 3 15:19:04 2015 +0530
----------------------------------------------------------------------
.../component/test_netscaler_lb_algo.py | 121 ++++++++++++++++---
.../component/test_netscaler_lb_sticky.py | 12 +-
2 files changed, 113 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9c2a1ea8/test/integration/component/test_netscaler_lb_algo.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb_algo.py b/test/integration/component/test_netscaler_lb_algo.py
index bafecd0..9e5001c 100644
--- a/test/integration/component/test_netscaler_lb_algo.py
+++ b/test/integration/component/test_netscaler_lb_algo.py
@@ -58,6 +58,8 @@ class TestLbWithRoundRobin(cloudstackTestCase):
cls._cleanup = []
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
@@ -76,8 +78,12 @@ class TestLbWithRoundRobin(cloudstackTestCase):
cls.testdata["service_offering"]
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -90,6 +96,9 @@ class TestLbWithRoundRobin(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.account = Account.create(
@@ -265,6 +274,8 @@ class TestLbWithLeastConn(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -285,8 +296,12 @@ class TestLbWithLeastConn(cloudstackTestCase):
)
cls._cleanup.append(cls.service_offering)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@@ -300,6 +315,9 @@ class TestLbWithLeastConn(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.account = Account.create(
@@ -483,6 +501,9 @@ class TestLbWithSourceIp(cloudstackTestCase):
cls._cleanup = []
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
+
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -502,8 +523,12 @@ class TestLbWithSourceIp(cloudstackTestCase):
)
cls._cleanup.append(cls.service_offering)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -516,6 +541,9 @@ class TestLbWithSourceIp(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.account = Account.create(
@@ -692,6 +720,9 @@ class TestLbAlgoRrLc(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
+
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -743,8 +774,12 @@ class TestLbAlgoRrLc(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -757,6 +792,9 @@ class TestLbAlgoRrLc(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
@@ -904,6 +942,8 @@ class TestLbAlgoLcRr(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -955,8 +995,13 @@ class TestLbAlgoLcRr(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
+
return
@classmethod
@@ -969,6 +1014,9 @@ class TestLbAlgoLcRr(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
@@ -1112,6 +1160,8 @@ class TestLbAlgoRrSb(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -1164,8 +1214,13 @@ class TestLbAlgoRrSb(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
+
return
@classmethod
@@ -1178,6 +1233,8 @@ class TestLbAlgoRrSb(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
@@ -1325,6 +1382,8 @@ class TestLbAlgoSbRr(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -1378,8 +1437,12 @@ class TestLbAlgoSbRr(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -1392,6 +1455,9 @@ class TestLbAlgoSbRr(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
@@ -1539,6 +1605,9 @@ class TestLbAlgoSbLc(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
+
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -1592,8 +1661,12 @@ class TestLbAlgoSbLc(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg =e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -1606,6 +1679,9 @@ class TestLbAlgoSbLc(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
@@ -1754,6 +1830,8 @@ class TestLbAlgoLcSb(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.testdata["configurableData"]["netscaler"])
cls._cleanup.append(cls.netscaler)
cls.network_offering = NetworkOffering.create(
@@ -1806,8 +1884,12 @@ class TestLbAlgoLcSb(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -1820,6 +1902,9 @@ class TestLbAlgoLcSb(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
+
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9c2a1ea8/test/integration/component/test_netscaler_lb_sticky.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb_sticky.py b/test/integration/component/test_netscaler_lb_sticky.py
index 3494eae..8ac85ab 100644
--- a/test/integration/component/test_netscaler_lb_sticky.py
+++ b/test/integration/component/test_netscaler_lb_sticky.py
@@ -57,6 +57,8 @@ class TestLbStickyPolicy(cloudstackTestCase):
cls.testdata["configurableData"]["netscaler"]["lbdevicededicated"] = False
try:
+ cls.exception_string = "Connection limit to CFE exceeded"
+ cls.skiptest = False
cls.netscaler = add_netscaler(
cls.api_client,
cls.zone.id,
@@ -110,8 +112,12 @@ class TestLbStickyPolicy(cloudstackTestCase):
networkid=cls.network.id
)
except Exception as e:
- cls.tearDownClass()
- raise Exception("Warning: Exception in setUpClass: %s" % e)
+ if cls.exception_string.lower() in e.lower():
+ cls.skiptest = True
+ cls.exception_msg = e
+ else:
+ cls.tearDownClass()
+ raise Exception("Warning: Exception in setUpClass: %s" % e)
return
@classmethod
@@ -124,6 +130,8 @@ class TestLbStickyPolicy(cloudstackTestCase):
return
def setUp(self):
+ if self.skiptest:
+ self.skipTest(self.exception_msg)
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.cleanup = []