Add cluster test config file.
One can modify the test iterations directly here.
Allow for minimum heap size configuration with 'M' or megabyte suffix for onos jvm heap.
Change-Id: I9da9c3a3799c4543512a9cf3ea3f309496df7e80
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index 81df366..0c30833 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -265,6 +265,9 @@
suffix = heap_size[-1]
if suffix == 'M':
heap_size_i /= 1024 #convert to gigs
+ #allow to specific minimum heap size
+ if heap_size_i == 0:
+ return heap_size
except:
##invalid suffix length probably. Fall back to default
heap_size = None
diff --git a/src/test/utils/CordTestConfig.py b/src/test/utils/CordTestConfig.py
index 0e369d9..fc4aafe 100644
--- a/src/test/utils/CordTestConfig.py
+++ b/src/test/utils/CordTestConfig.py
@@ -5,25 +5,21 @@
from nose.tools import assert_not_equal
def setup_module(module):
- class_found = None
+ class_test = None
for name, obj in inspect.getmembers(module):
if inspect.isclass(obj) and issubclass(obj, unittest.TestCase):
if obj.__name__.endswith('exchange'):
- class_found = obj
+ class_test = obj
break
else:
- class_found = obj
+ class_test = obj
- assert_not_equal(class_found, None)
- try:
- module_name = module.__name__.split('.')[-1]
- except:
- module_name = module.__name__
-
+ assert_not_equal(class_test, None)
+ module_name = module.__name__.split('.')[-1]
cfg = '{}.json'.format(module_name)
module_config = os.path.join(os.path.dirname(module.__file__), cfg)
if os.access(module_config, os.F_OK):
with open(module_config) as f:
json_data = json.load(f)
for k, v in json_data.iteritems():
- setattr(class_found, k, v)
+ setattr(class_test, k, v)