From 2736e2dabf7d6ffb2f201d64007db9dfca27ac86 Mon Sep 17 00:00:00 2001 From: Manishanker Talusani Date: Wed, 30 Apr 2014 21:30:48 +0530 Subject: [PATCH] Replaced the word components with component(s) Current wording in exception messages of sahara is misleading Even when there is a single component, exceptions.py and test_job_executor.py use the word "components" instead of "component". Observed exception message was "Hadoop cluster should contain 1 oozie components.". Instead, the exception message should be "Hadoop cluster should contain 1 oozie component(s)." to avoid confusion. To avoid this confusion, the word "components" has been replaced with the word "component(s)" Closes-Bug : #1312908 Change-Id: I6f385a52669bc05fb0bf28cacaf88688576c10c5 --- sahara/plugins/general/exceptions.py | 2 +- sahara/tests/unit/service/validation/edp/test_job_executor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sahara/plugins/general/exceptions.py b/sahara/plugins/general/exceptions.py index ee9e17d517..8796449937 100644 --- a/sahara/plugins/general/exceptions.py +++ b/sahara/plugins/general/exceptions.py @@ -62,7 +62,7 @@ class InvalidComponentCountException(e.SaharaException): """ def __init__(self, component, expected_count, count): - self.message = ("Hadoop cluster should contain {0} {1} components." + self.message = ("Hadoop cluster should contain {0} {1} component(s)." " Actual {1} count is {2}".format( expected_count, component, count)) self.code = "INVALID_COMPONENT_COUNT" diff --git a/sahara/tests/unit/service/validation/edp/test_job_executor.py b/sahara/tests/unit/service/validation/edp/test_job_executor.py index 26b1897d95..233b7b07db 100644 --- a/sahara/tests/unit/service/validation/edp/test_job_executor.py +++ b/sahara/tests/unit/service/validation/edp/test_job_executor.py @@ -144,7 +144,7 @@ class TestJobExecValidation(u.ValidationTestCase): "output_id": six.text_type(uuid.uuid4()) }, bad_req_i=(1, "INVALID_COMPONENT_COUNT", - "Hadoop cluster should contain 1 oozie components. " + "Hadoop cluster should contain 1 oozie component(s). " "Actual oozie count is 0")) ng = tu.make_ng_dict('master', 42, ['oozie'], 1,