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:59:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 2a26ccb7c -> 0ee5b323c


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

This reverts commit 38a92b7ff52a005467aecede087222f9e9df79c5.


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

Branch: refs/heads/branch-2.2
Commit: 0ee5b323c77b416b9ffff7e55613e218b9b292b8
Parents: 2a26ccb
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Sun Dec 13 12:59:13 2015 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Sun Dec 13 12:59:13 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/0ee5b323/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 dd8592a..f77397b 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
@@ -1542,8 +1542,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/0ee5b323/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index b468f7d..1ad0f6a 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1549,8 +1549,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/0ee5b323/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 3611646..a9557cf 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
@@ -1333,6 +1333,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);
     });
@@ -1341,36 +1346,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