ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: Revert "AMBARI-14352. Should show error message when "Pause Upgrade" failed. (Xi Wang via Jaimin)"
Date Sun, 13 Dec 2015 20:58:50 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 82eb633af -> 8f60188d6


Revert "AMBARI-14352. Should show error message when "Pause Upgrade" failed. (Xi Wang via
Jaimin)"

This reverts commit 869ecc234fd778c9c87e7f2c209a3277fa12c249.


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

Branch: refs/heads/trunk
Commit: 8f60188d6b83e8dcdaddcde2c49b9d71bc997fe0
Parents: 82eb633
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Sun Dec 13 12:58:28 2015 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Sun Dec 13 12:58:28 2015 -0800

----------------------------------------------------------------------
 .../main/admin/stack_and_upgrade_controller.js  |  2 --
 ambari-web/app/messages.js                      |  2 --
 .../admin/stack_and_upgrade_controller_test.js  | 30 ++++----------------
 3 files changed, 6 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f60188d/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index bf75d8c..e6179b5 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1534,8 +1534,6 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
         wizardControllerName: self.get('name'),
         localdb: App.db.data
       });
-    }).fail(function () {
-      return App.showAlertPopup(Em.I18n.t('admin.stackUpgrade.state.paused.fail.header'),
Em.I18n.t('admin.stackUpgrade.state.paused.fail.body'));
     });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f60188d/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 639cacf..8ab24d4 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1532,8 +1532,6 @@ Em.I18n.translations = {
   'admin.stackUpgrade.title': "Stack and Versions",
   'admin.stackUpgrade.state.inProgress': "Upgrade in Progress",
   'admin.stackUpgrade.state.paused': "Upgrade Paused",
-  'admin.stackUpgrade.state.paused.fail.header': "Pause Upgrade failed",
-  'admin.stackUpgrade.state.paused.fail.body': "Upgrade cannot be paused, try other options.",
   'admin.stackUpgrade.state.aborted': "Upgrade Aborted",
   'admin.stackUpgrade.state.completed': "Upgrade Finished",
   'admin.stackUpgrade.state.inProgress.downgrade': "Downgrade in Progress",

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f60188d/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index f772c2b..630d0b2 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -1332,6 +1332,11 @@ describe('App.MainAdminStackAndUpgradeController', function() {
 
   describe("#suspendUpgrade()", function() {
     beforeEach(function () {
+      sinon.stub(controller, 'abortUpgrade').returns({
+        done: function (callback) {
+          callback();
+        }
+      });
       sinon.stub(controller, 'setDBProperty', Em.K);
       sinon.stub(App.clusterStatus, 'setClusterStatus', Em.K);
     });
@@ -1340,36 +1345,13 @@ describe('App.MainAdminStackAndUpgradeController', function() {
       controller.setDBProperty.restore();
       App.clusterStatus.setClusterStatus.restore();
     });
-    it("Suspend upgrade successfully", function() {
-      sinon.stub(controller, 'abortUpgrade').returns({
-        done: function (callback) {
-          callback();
-          return ({
-            fail: function () {}
-          })
-        }
-      });
+    it("", function() {
       controller.suspendUpgrade();
       expect(controller.abortUpgrade.calledOnce).to.be.true;
       expect(App.get('upgradeState')).to.equal('ABORTED');
       expect(controller.setDBProperty.calledWith('upgradeState', 'ABORTED')).to.be.true;
       expect(App.clusterStatus.setClusterStatus.calledOnce).to.be.true;
     });
-    it("Suspend upgrade failed", function() {
-      sinon.stub(controller, 'abortUpgrade').returns({
-        done: function (callback) {
-          return ({
-            fail: function (callback) {
-              callback();
-            }
-          })
-        }
-      });
-      controller.suspendUpgrade();
-      expect(controller.abortUpgrade.calledOnce).to.be.true;
-      expect(controller.setDBProperty.calledWith('upgradeState', 'ABORTED')).to.be.false;
-      expect(App.clusterStatus.setClusterStatus.calledOnce).to.be.false;
-    });
   });
 
   describe("#resumeUpgrade()", function() {


Mime
View raw message