ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-9809. Move Hive Metastore problems after rollback completed. (akovalenko)
Date Thu, 26 Feb 2015 14:33:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 5b55f3862 -> 19ec2611b


AMBARI-9809. Move Hive Metastore problems after rollback completed. (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/19ec2611
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/19ec2611
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/19ec2611

Branch: refs/heads/branch-2.0.0
Commit: 19ec2611b32d55d2a968f37ce33bfbc5021fdeaa
Parents: 5b55f38
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Thu Feb 26 14:46:35 2015 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Thu Feb 26 16:31:34 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/assets/test/tests.js             |  1 +
 .../main/service/reassign/step7_controller.js   |  1 +
 ambari-web/app/routes/reassign_master_routes.js |  3 +-
 .../service/reassign/step7_controller_test.js   | 50 ++++++++++++++++++++
 4 files changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/19ec2611/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index cfd519f..ef2e202 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -94,6 +94,7 @@ var files = ['test/init_model_test',
   'test/controllers/main/service/reassign/step2_controller_test',
   'test/controllers/main/service/reassign/step4_controller_test',
   'test/controllers/main/service/reassign/step6_controller_test',
+  'test/controllers/main/service/reassign/step7_controller_test',
   'test/controllers/main/dashboard_test',
   'test/controllers/main/host_test',
   'test/controllers/main/service/item_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/19ec2611/ambari-web/app/controllers/main/service/reassign/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step7_controller.js b/ambari-web/app/controllers/main/service/reassign/step7_controller.js
index 5fcb1f1..2617a6a 100644
--- a/ambari-web/app/controllers/main/service/reassign/step7_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step7_controller.js
@@ -49,6 +49,7 @@ App.ReassignMasterWizardStep7Controller = App.ReassignMasterWizardStep4Controlle
     }
 
     this.removeUnneededTasks();
+    this.set('isLoaded', true);
   },
 
   putHostComponentsInMaintenanceMode: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/19ec2611/ambari-web/app/routes/reassign_master_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js
index bb52fab..b93f9a6 100644
--- a/ambari-web/app/routes/reassign_master_routes.js
+++ b/ambari-web/app/routes/reassign_master_routes.js
@@ -40,7 +40,6 @@ module.exports = App.WizardRoute.extend({
     console.log('in /service/reassign:enter');
     var context = this;
     var reassignMasterController = router.get('reassignMasterController');
-    var currStep = reassignMasterController.get('currentStep');
 
     reassignMasterController.dataLoading().done(function () {
       if (App.router.get('mainHostController.hostsCountMap.TOTAL') > 1) {
@@ -62,6 +61,7 @@ module.exports = App.WizardRoute.extend({
               App.router.transitionTo('main.services.index');
             },
             onClose: function () {
+              var currStep = reassignMasterController.get('currentStep');
               if (parseInt(currStep) > 3) {
                 var self = this;
 
@@ -92,6 +92,7 @@ module.exports = App.WizardRoute.extend({
           reassignMasterController.set('popup', popup);
           reassignMasterController.loadSecurityEnabled();
           reassignMasterController.loadComponentToReassign();
+          var currStep = reassignMasterController.get('currentStep');
           var currentClusterStatus = App.clusterStatus.get('value');
           if (currentClusterStatus) {
             switch (currentClusterStatus.clusterState) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/19ec2611/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
new file mode 100644
index 0000000..304fdb6
--- /dev/null
+++ b/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+App = require('app');
+
+require('controllers/main/service/reassign/step7_controller');
+
+describe('App.ReassignMasterWizardStep7Controller', function () {
+
+  var controller = App.ReassignMasterWizardStep7Controller.create({
+    content: Em.Object.create({
+      reassign: Em.Object.create(),
+      reassignHosts: Em.Object.create()
+    })
+  });
+
+  beforeEach(function () {
+    sinon.stub(App.ajax, 'send', Em.K);
+  });
+  afterEach(function () {
+    App.ajax.send.restore();
+  });
+
+  describe('#initializeTasks()', function () {
+
+    it('should set isLoaded to true', function () {
+      controller.set('isLoaded', false);
+
+      controller.initializeTasks();
+      expect(controller.get('isLoaded')).to.be.true;
+    });
+
+  });
+
+});


Mime
View raw message