From 0f22fdb18fa3570936ca6439ea1d143e74420cf6 Mon Sep 17 00:00:00 2001 From: luhuichun Date: Thu, 19 Mar 2015 06:30:56 +0800 Subject: [PATCH] Add integration tests for scaling in Spark Spark scaling cluster was fixed, so we need to add scaling integration test Closes-bug: #1433064 Change-Id: I8b5d50786507d418620973401b11b2a76a8becc0 --- .../tests/gating/test_spark_gating.py | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sahara/tests/integration/tests/gating/test_spark_gating.py b/sahara/tests/integration/tests/gating/test_spark_gating.py index 211bb7b2..59084970 100644 --- a/sahara/tests/integration/tests/gating/test_spark_gating.py +++ b/sahara/tests/integration/tests/gating/test_spark_gating.py @@ -127,12 +127,27 @@ class SparkGatingTest(swift.SwiftTest, scaling.ScalingTest, @b.errormsg("Failure while cluster scaling: ") def _check_scaling(self): - pass + change_list = [ + { + 'operation': 'resize', + 'info': ['worker-node', 2] + }, + { + 'operation': 'add', + 'info': [ + 'new-worker-node', 1, '%s' % self.ng_tmpl_s_dn_id + ] + } + ] + + self.cluster_info = self.cluster_scaling(self.cluster_info, + change_list) + self.await_active_workers_for_namenode(self.cluster_info['node_info'], + self.plugin_config) @b.errormsg("Failure while EDP testing after cluster scaling: ") def _check_edp_after_scaling(self): - # Leave this blank until scaling is implemented - pass + self._check_edp() @testcase.attr('spark') @testcase.skipIf(config.SKIP_ALL_TESTS_FOR_PLUGIN,