service_test.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var App = require('app');
  19. require('controllers/main/service');
  20. var testHelpers = require('test/helpers');
  21. var mainServiceController;
  22. function getController() {
  23. return App.MainServiceController.create({});
  24. }
  25. describe('App.MainServiceController', function () {
  26. var tests = Em.A([
  27. {
  28. isStartStopAllClicked: true,
  29. content: Em.A([
  30. Em.Object.create({
  31. healthStatus: 'red',
  32. serviceName: 'HIVE',
  33. isClientsOnly: false
  34. }),
  35. Em.Object.create({
  36. healthStatus: 'red',
  37. serviceName: 'HDFS',
  38. isClientsOnly: false
  39. }),
  40. Em.Object.create({
  41. healthStatus: 'red',
  42. serviceName: 'TEZ',
  43. isClientsOnly: true
  44. })
  45. ]),
  46. eStart: true,
  47. eStop: true,
  48. mStart: 'mainServiceController StartAll is Disabled 2',
  49. mStop: 'mainServiceController StopAll is Disabled 2'
  50. },
  51. {
  52. isStartStopAllClicked: false,
  53. content: Em.A([
  54. Em.Object.create({
  55. healthStatus: 'green',
  56. serviceName: 'HIVE',
  57. isClientsOnly: false
  58. }),
  59. Em.Object.create({
  60. healthStatus: 'red',
  61. serviceName: 'HDFS',
  62. isClientsOnly: false
  63. }),
  64. Em.Object.create({
  65. healthStatus: 'red',
  66. serviceName: 'TEZ',
  67. isClientsOnly: true
  68. })
  69. ]),
  70. eStart: false,
  71. eStop: false,
  72. mStart: 'mainServiceController StartAll is Enabled 3',
  73. mStop: 'mainServiceController StopAll is Enabled 3'
  74. }
  75. ]);
  76. beforeEach(function() {
  77. mainServiceController = getController();
  78. });
  79. afterEach(function () {
  80. mainServiceController.destroy();
  81. });
  82. App.TestAliases.testAsComputedNotEqual(getController(), 'isStartStopAllClicked', 'App.router.backgroundOperationsController.allOperationsCount', 0);
  83. describe('#isStartAllDisabled', function () {
  84. tests.forEach(function (test) {
  85. it(test.mStart, function () {
  86. mainServiceController = App.MainServiceController.create({
  87. content: test.content,
  88. isStartStopAllClicked: test.isStartStopAllClicked
  89. });
  90. expect(mainServiceController.get('isStartAllDisabled')).to.equals(test.eStart);
  91. });
  92. });
  93. });
  94. describe('#isStopAllDisabled', function () {
  95. tests.forEach(function (test) {
  96. it(test.mStop, function () {
  97. mainServiceController = App.MainServiceController.create({
  98. content: test.content,
  99. isStartStopAllClicked: test.isStartStopAllClicked
  100. });
  101. expect(mainServiceController.get('isStopAllDisabled')).to.equals(test.eStop);
  102. });
  103. });
  104. });
  105. describe("#isAllServicesInstalled", function() {
  106. beforeEach(function() {
  107. sinon.stub(App.StackService, 'find').returns([
  108. Em.Object.create({serviceName: 'S1'})
  109. ]);
  110. });
  111. afterEach(function() {
  112. App.StackService.find.restore();
  113. });
  114. it("content is null", function() {
  115. mainServiceController.reopen({
  116. 'content': null
  117. });
  118. mainServiceController.propertyDidChange('isAllServicesInstalled');
  119. expect(mainServiceController.get('isAllServicesInstalled')).to.be.false;
  120. });
  121. it("content is empty", function() {
  122. mainServiceController.reopen({
  123. 'content': []
  124. });
  125. mainServiceController.propertyDidChange('isAllServicesInstalled');
  126. expect(mainServiceController.get('isAllServicesInstalled')).to.be.false;
  127. });
  128. it("content match stack services", function() {
  129. mainServiceController.reopen({
  130. 'content': [Em.Object.create({serviceName: 'S1'})]
  131. });
  132. mainServiceController.propertyDidChange('isAllServicesInstalled');
  133. expect(mainServiceController.get('isAllServicesInstalled')).to.be.true;
  134. });
  135. });
  136. describe('#cluster', function() {
  137. Em.A([
  138. {
  139. isLoaded: true,
  140. cluster: [],
  141. m: 'cluster is loaded',
  142. e: {name: 'c1'}
  143. },
  144. {
  145. isLoaded: false,
  146. cluster: [],
  147. m: 'cluster is not loaded',
  148. e: null
  149. }
  150. ]).forEach(function(test) {
  151. describe(test.m, function() {
  152. beforeEach(function () {
  153. sinon.stub(App.router, 'get', function(k) {
  154. if ('clusterController.isClusterDataLoaded' === k) return test.isLoaded;
  155. return Em.get(App.router, k);
  156. });
  157. sinon.stub(App.Cluster, 'find', function() {
  158. return [test.e];
  159. });
  160. });
  161. afterEach(function () {
  162. App.router.get.restore();
  163. App.Cluster.find.restore();
  164. });
  165. it('cluster is valid', function () {
  166. var c = mainServiceController.get('cluster');
  167. expect(c).to.eql(test.e);
  168. });
  169. });
  170. });
  171. });
  172. describe('#startAllService', function() {
  173. beforeEach(function() {
  174. sinon.stub(mainServiceController, 'allServicesCall', Em.K);
  175. });
  176. afterEach(function() {
  177. mainServiceController.allServicesCall.restore();
  178. });
  179. it('target is disabled', function() {
  180. var event = {target: {className: 'disabled', nodeType: 1}};
  181. var r = mainServiceController.startAllService(event);
  182. expect(r).to.be.null;
  183. });
  184. it('parent is disabled', function() {
  185. var event = {target: {parentElement: {className: 'disabled', nodeType: 1}}};
  186. var r = mainServiceController.startAllService(event);
  187. expect(r).to.be.null;
  188. });
  189. });
  190. describe('#stopAllService', function() {
  191. beforeEach(function() {
  192. sinon.stub(mainServiceController, 'allServicesCall', Em.K);
  193. });
  194. afterEach(function() {
  195. mainServiceController.allServicesCall.restore();
  196. });
  197. it('target is disabled', function() {
  198. var event = {target: {className: 'disabled', nodeType: 1}};
  199. var r = mainServiceController.stopAllService(event);
  200. expect(r).to.be.null;
  201. });
  202. it('parent is disabled', function() {
  203. var event = {target: {parentElement: {className: 'disabled', nodeType: 1}}};
  204. var r = mainServiceController.stopAllService(event);
  205. expect(r).to.be.null;
  206. });
  207. });
  208. describe('#startStopAllService', function() {
  209. var event = { target: document.createElement("BUTTON") };
  210. beforeEach(function() {
  211. sinon.stub(mainServiceController, 'allServicesCall', Em.K);
  212. sinon.spy(Em.I18n, "t");
  213. });
  214. afterEach(function() {
  215. mainServiceController.allServicesCall.restore();
  216. Em.I18n.t.restore();
  217. });
  218. it ("should confirm stop if state is INSTALLED", function() {
  219. mainServiceController.startStopAllService(event, "INSTALLED");
  220. expect(Em.I18n.t.calledWith('services.service.stopAll.confirmMsg')).to.be.ok;
  221. expect(Em.I18n.t.calledWith('services.service.stop.confirmButton')).to.be.ok;
  222. });
  223. describe("should check last checkpoint for NN before confirming stop", function() {
  224. var mainServiceItemController;
  225. beforeEach(function() {
  226. mainServiceItemController = App.MainServiceItemController.create({});
  227. sinon.stub(mainServiceItemController, 'checkNnLastCheckpointTime', function() {
  228. return true;
  229. });
  230. sinon.stub(App.router, 'get', function(k) {
  231. if ('mainServiceItemController' === k) {
  232. return mainServiceItemController;
  233. }
  234. return Em.get(App.router, k);
  235. });
  236. sinon.stub(App.Service, 'find', function() {
  237. return [{
  238. serviceName: "HDFS",
  239. workStatus: "STARTED"
  240. }];
  241. });
  242. });
  243. afterEach(function () {
  244. mainServiceItemController.checkNnLastCheckpointTime.restore();
  245. App.router.get.restore();
  246. App.Service.find.restore();
  247. });
  248. it('checkNnLastCheckpointTime is called once', function () {
  249. mainServiceController.startStopAllService(event, "INSTALLED");
  250. expect(mainServiceItemController.checkNnLastCheckpointTime.calledOnce).to.equal(true);
  251. });
  252. });
  253. it ("should confirm start if state is not INSTALLED", function() {
  254. mainServiceController.startStopAllService(event, "STARTED");
  255. expect(Em.I18n.t.calledWith('services.service.startAll.confirmMsg')).to.be.ok;
  256. expect(Em.I18n.t.calledWith('services.service.start.confirmButton')).to.be.ok;
  257. });
  258. });
  259. describe('#allServicesCall', function() {
  260. var state = 'STARTED',
  261. query = 'some query';
  262. beforeEach(function() {
  263. sinon.stub(App, 'get', function(k) {
  264. if ('clusterName' === k) return 'tdk';
  265. return Em.get(App, k);
  266. });
  267. mainServiceController.allServicesCall(state, query);
  268. var args = testHelpers.findAjaxRequest('name', 'common.services.update');
  269. this.params = App.ajax.fakeGetUrl('common.services.update').format(args[0].data);
  270. this.data = JSON.parse(this.params.data);
  271. });
  272. afterEach(function() {
  273. App.get.restore();
  274. });
  275. it('PUT request is sent', function() {
  276. expect(this.params.type).to.equal('PUT');
  277. });
  278. it('Body.ServiceInfo.state is ' + state, function() {
  279. expect(this.data.Body.ServiceInfo.state).to.equal(state);
  280. });
  281. it('RequestInfo.context is ' + query, function() {
  282. expect(this.data.RequestInfo.context).to.equal(App.BackgroundOperationsController.CommandContexts.START_ALL_SERVICES);
  283. });
  284. });
  285. describe('#allServicesCallErrorCallback', function() {
  286. it('should set status to FAIL', function() {
  287. var params = {query: Em.Object.create({status: ''})};
  288. mainServiceController.allServicesCallErrorCallback({}, {}, '', {}, params);
  289. expect(params.query.get('status')).to.equal('FAIL');
  290. });
  291. });
  292. describe('#gotoAddService', function() {
  293. beforeEach(function() {
  294. sinon.stub(App.router, 'transitionTo', Em.K);
  295. });
  296. afterEach(function() {
  297. App.router.transitionTo.restore();
  298. });
  299. it('should not go to wizard', function() {
  300. mainServiceController.reopen({isAllServicesInstalled: true});
  301. mainServiceController.gotoAddService();
  302. expect(App.router.transitionTo.called).to.be.false;
  303. });
  304. it('should go to wizard', function() {
  305. mainServiceController.reopen({isAllServicesInstalled: false});
  306. mainServiceController.gotoAddService();
  307. expect(App.router.transitionTo.calledWith('main.serviceAdd')).to.be.true;
  308. });
  309. });
  310. App.TestAliases.testAsComputedEveryBy(getController(), 'isRestartAllRequiredDisabled', 'content', 'isRestartRequired', false);
  311. describe('#restartAllRequired', function () {
  312. beforeEach(function () {
  313. sinon.spy(App, 'showConfirmationPopup');
  314. sinon.spy(mainServiceController, 'restartHostComponents');
  315. sinon.stub(App.HostComponent, 'find', function() {
  316. return [
  317. Em.Object.create({
  318. componentName: 'componentName1',
  319. hostName: 'hostName1',
  320. service: {
  321. serviceName: 'serviceName1',
  322. displayName: 'displayName1'
  323. },
  324. staleConfigs: true
  325. }),
  326. Em.Object.create({
  327. componentName: 'componentName2',
  328. hostName: 'hostName2',
  329. service: {
  330. serviceName: 'serviceName2',
  331. displayName: 'displayName2'
  332. },
  333. staleConfigs: true
  334. }),
  335. Em.Object.create({
  336. componentName: 'componentName3',
  337. hostName: 'hostName3',
  338. service: {
  339. serviceName: 'serviceName3',
  340. displayName: 'displayName3'
  341. },
  342. staleConfigs: false
  343. })
  344. ];
  345. });
  346. });
  347. afterEach(function () {
  348. App.HostComponent.find.restore();
  349. App.showConfirmationPopup.restore();
  350. mainServiceController.restartHostComponents.restore();
  351. });
  352. it('should show confirmation popup with list of services and call restartHostComponents after confirmation', function () {
  353. var popup;
  354. mainServiceController.reopen({
  355. isRestartAllRequiredDisabled: false
  356. });
  357. popup = mainServiceController.restartAllRequired();
  358. popup.onPrimary();
  359. expect(App.showConfirmationPopup.args[0][1]).to.equal(Em.I18n.t('services.service.refreshAll.confirmMsg').format('displayName1, displayName2'));
  360. expect(mainServiceController.restartHostComponents.calledOnce).to.be.true;
  361. });
  362. it('should not open popup if isRestartAllRequiredDisabled is true', function(){
  363. mainServiceController.reopen({
  364. isRestartAllRequiredDisabled: true
  365. });
  366. expect(mainServiceController.restartAllRequired()).to.be.null;
  367. });
  368. });
  369. describe("#restartAllServices()", function() {
  370. beforeEach(function() {
  371. sinon.stub(mainServiceController, 'silentStopAllServices');
  372. });
  373. afterEach(function() {
  374. mainServiceController.silentStopAllServices.restore();
  375. });
  376. it("silentStopAllServices should be called", function() {
  377. mainServiceController.restartAllServices();
  378. expect(mainServiceController.silentStopAllServices.calledOnce).to.be.true;
  379. });
  380. });
  381. describe("#silentStopAllServices()", function() {
  382. it("App.ajax.send should be called", function() {
  383. mainServiceController.silentStopAllServices();
  384. var args = testHelpers.filterAjaxRequests('name', 'common.services.update');
  385. expect(args[0][0]).to.eql({
  386. name: 'common.services.update',
  387. sender: mainServiceController,
  388. data: {
  389. context: App.BackgroundOperationsController.CommandContexts.STOP_ALL_SERVICES,
  390. ServiceInfo: {
  391. state: 'INSTALLED'
  392. }
  393. },
  394. success: 'silentStopSuccess'
  395. });
  396. });
  397. });
  398. describe("#isStopAllServicesFailed()", function() {
  399. beforeEach(function() {
  400. this.mock = sinon.stub(App.Service, 'find');
  401. });
  402. afterEach(function() {
  403. this.mock.restore();
  404. });
  405. it("one INSTALLED service", function() {
  406. this.mock.returns([
  407. Em.Object.create({workStatus: 'INSTALLED'})
  408. ]);
  409. expect(mainServiceController.isStopAllServicesFailed()).to.be.false;
  410. });
  411. it("one STOPPING service", function() {
  412. this.mock.returns([
  413. Em.Object.create({workStatus: 'STOPPING'})
  414. ]);
  415. expect(mainServiceController.isStopAllServicesFailed()).to.be.false;
  416. });
  417. it("one STARTED service and one INSTALLED", function() {
  418. this.mock.returns([
  419. Em.Object.create({workStatus: 'STARTED'}),
  420. Em.Object.create({workStatus: 'INSTALLED'})
  421. ]);
  422. expect(mainServiceController.isStopAllServicesFailed()).to.be.true;
  423. });
  424. it("one STARTED service", function() {
  425. this.mock.returns([
  426. Em.Object.create({workStatus: 'STARTED'})
  427. ]);
  428. expect(mainServiceController.isStopAllServicesFailed()).to.be.true;
  429. });
  430. });
  431. describe("#silentStopSuccess()", function() {
  432. var mock = {
  433. dataLoading: function() {
  434. return {
  435. done: function(callback) {
  436. callback(true);
  437. }
  438. }
  439. },
  440. showPopup: Em.K
  441. };
  442. beforeEach(function() {
  443. sinon.stub(App.router, 'get').returns(mock);
  444. sinon.stub(Em.run, 'later', Em.clb);
  445. sinon.spy(mock, 'showPopup');
  446. sinon.stub(mainServiceController, 'silentStartAllServices');
  447. mainServiceController.silentStopSuccess();
  448. });
  449. afterEach(function() {
  450. App.router.get.restore();
  451. Em.run.later.restore();
  452. mock.showPopup.restore();
  453. mainServiceController.silentStartAllServices.restore();
  454. });
  455. it("showPopup should be called", function() {
  456. expect(mock.showPopup.calledOnce).to.be.true;
  457. });
  458. it("Em.run.later should be called", function() {
  459. expect(Em.run.later.calledOnce).to.be.true;
  460. expect(mainServiceController.get('shouldStart')).to.be.true;
  461. });
  462. });
  463. describe("#silentStartAllServices()", function() {
  464. beforeEach(function() {
  465. this.mockRouter = sinon.stub(App.router, 'get');
  466. this.mock = sinon.stub(mainServiceController, 'isStopAllServicesFailed');
  467. mainServiceController.removeObserver('shouldStart', mainServiceController, 'silentStartAllServices');
  468. });
  469. afterEach(function() {
  470. this.mockRouter.restore();
  471. this.mock.restore();
  472. });
  473. it("allOperationsCount is 1", function() {
  474. this.mockRouter.returns(Em.Object.create({
  475. allOperationsCount: 1
  476. }));
  477. mainServiceController.silentStartAllServices();
  478. expect(testHelpers.findAjaxRequest('name', 'common.services.update')).to.be.undefined;
  479. });
  480. it("shouldStart is false", function() {
  481. this.mockRouter.returns(Em.Object.create({
  482. allOperationsCount: 0
  483. }));
  484. mainServiceController.set('shouldStart', false);
  485. mainServiceController.silentStartAllServices();
  486. expect(testHelpers.findAjaxRequest('name', 'common.services.update')).to.be.undefined;
  487. });
  488. it("isStopAllServicesFailed returns true", function() {
  489. this.mockRouter.returns(Em.Object.create({
  490. allOperationsCount: 0
  491. }));
  492. mainServiceController.set('shouldStart', true);
  493. this.mock.returns(true);
  494. mainServiceController.silentStartAllServices();
  495. expect(testHelpers.findAjaxRequest('name', 'common.services.update')).to.be.undefined;
  496. });
  497. it("App.ajax.send should be called", function() {
  498. this.mockRouter.returns(Em.Object.create({
  499. allOperationsCount: 0
  500. }));
  501. mainServiceController.set('shouldStart', true);
  502. this.mock.returns(false);
  503. mainServiceController.silentStartAllServices();
  504. var args = testHelpers.filterAjaxRequests('name', 'common.services.update');
  505. expect(args[0][0]).to.be.eql({
  506. name: 'common.services.update',
  507. sender: mainServiceController,
  508. data: {
  509. context: App.BackgroundOperationsController.CommandContexts.START_ALL_SERVICES,
  510. ServiceInfo: {
  511. state: 'STARTED'
  512. }
  513. },
  514. success: 'silentCallSuccessCallback'
  515. });
  516. expect(mainServiceController.get('shouldStart')).to.be.false;
  517. });
  518. });
  519. describe("#silentCallSuccessCallback()", function () {
  520. var mock = {
  521. dataLoading: function () {
  522. return {
  523. done: function (callback) {
  524. callback(true);
  525. }
  526. }
  527. },
  528. showPopup: Em.K
  529. };
  530. beforeEach(function () {
  531. sinon.stub(App.router, 'get').returns(mock);
  532. sinon.spy(mock, 'showPopup');
  533. });
  534. afterEach(function () {
  535. App.router.get.restore();
  536. mock.showPopup.restore();
  537. });
  538. it("showPopup should be called", function () {
  539. mainServiceController.silentCallSuccessCallback();
  540. expect(mock.showPopup.calledOnce).to.be.true;
  541. });
  542. });
  543. describe("#allServicesCallSuccessCallback()", function () {
  544. var mock = {
  545. dataLoading: function () {
  546. return {
  547. done: function (callback) {
  548. callback(true);
  549. }
  550. }
  551. },
  552. showPopup: Em.K
  553. };
  554. beforeEach(function () {
  555. sinon.stub(App.router, 'get').returns(mock);
  556. sinon.spy(mock, 'showPopup');
  557. });
  558. afterEach(function () {
  559. App.router.get.restore();
  560. mock.showPopup.restore();
  561. });
  562. it("showPopup should be called", function () {
  563. var params = {
  564. query: Em.Object.create()
  565. };
  566. mainServiceController.allServicesCallSuccessCallback({}, {}, params);
  567. expect(mock.showPopup.calledOnce).to.be.true;
  568. expect(params.query.get('status')).to.be.equal('SUCCESS');
  569. });
  570. });
  571. describe("#restartAllRequiredSuccessCallback()", function () {
  572. var mock = {
  573. dataLoading: function () {
  574. return {
  575. done: function (callback) {
  576. callback(true);
  577. }
  578. }
  579. },
  580. showPopup: Em.K
  581. };
  582. beforeEach(function () {
  583. sinon.stub(App.router, 'get').returns(mock);
  584. sinon.spy(mock, 'showPopup');
  585. });
  586. afterEach(function () {
  587. App.router.get.restore();
  588. mock.showPopup.restore();
  589. });
  590. it("showPopup should be called", function () {
  591. mainServiceController.restartAllRequiredSuccessCallback();
  592. expect(mock.showPopup.calledOnce).to.be.true;
  593. });
  594. });
  595. describe('#restartHostComponents', function () {
  596. beforeEach(function () {
  597. this.mock = sinon.stub(App.HostComponent, 'find');
  598. });
  599. afterEach(function () {
  600. App.HostComponent.find.restore();
  601. });
  602. it('should make batch request to refresh YARN queues', function () {
  603. this.mock.returns([Em.Object.create({componentName: 'HIVE_SERVER_INTERACTIVE', staleConfigs: true}), Em.Object.create({componentName: 'RESOURCEMANAGER', staleConfigs: false})]);
  604. mainServiceController.restartHostComponents();
  605. expect(testHelpers.findAjaxRequest('name', 'common.batch.request_schedules')).not.to.be.undefined;
  606. });
  607. it('should make single request without refresh YARN queues', function () {
  608. this.mock.returns([Em.Object.create({componentName: 'HIVE_SERVER_INTERACTIVE', staleConfigs: false}), Em.Object.create({componentName: 'RESOURCEMANAGER', staleConfigs: false})]);
  609. mainServiceController.restartHostComponents();
  610. expect(testHelpers.findAjaxRequest('name', 'request.post')).not.to.be.undefined;
  611. });
  612. });
  613. });