----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42376/#review115043 -----------------------------------------------------------
ambari-web/test/views/common/quick_link_view_test.js (lines 184 - 190) <https://reviews.apache.org/r/42376/#comment175888> Since we are stubbing the getQuickLinksConfigurtion of quickViewLinks Object in beforeEach method, we should restore it back on completion of unit test in afterEach method quickViewLinks.getQuickLinksConfiguration.restore(); ambari-web/test/views/common/quick_link_view_test.js (line 186) <https://reviews.apache.org/r/42376/#comment175892> Lets decalre mock as a local variable to a unit test rather than attribute of the context object. This can be done by declaring mock as a variable in the beginning outside of beforeEach and using that variable throughout the test. ambari-web/test/views/common/quick_link_view_test.js (line 200) <https://reviews.apache.org/r/42376/#comment175889> redundant comma (a minor observation caught by IDE) ambari-web/test/views/common/quick_link_view_test.js (line 217) <https://reviews.apache.org/r/42376/#comment175890> redundant comma (a minor observation caught by IDE) - Jaimin Jetly On Jan. 18, 2016, 6:22 p.m., Zhe (Joe) Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42376/ > ----------------------------------------------------------- > > (Updated Jan. 18, 2016, 6:22 p.m.) > > > Review request for Ambari, Di Li, Jaimin Jetly, Richard Zang, and Yusaku Sako. > > > Bugs: AMBARI-14653 > https://issues.apache.org/jira/browse/AMBARI-14653 > > > Repository: ambari > > > Description > ------- > > HBase Links Metric - more links are pointing to the convetional > hbase.master.info.port 60010, while it's configured as 16010. It happens when > HBase links and Yarn links metrics are both on Dashboard. > It's due to in ambari/ambari-web/app/views/common/quick_view_link_view.js > loadQuickLinksConfigSuccessCallback(), requiredSiteNames gets overridden > every time when there is a quickLinks view loaded. So when Hbase links metric > first gets loaded, it sets requiredSiteNames to ['core-site', 'hbase-site', > 'hdfs-site']. But when Yarn links metric gets loaded, it overrides > requiredSiteNames to ['core-site', 'hdfs-site', 'yarn-site']. > So when Yarn links get loaded, Hbase links get set to default value as > 'hbase-site' is not in requiredSiteNames. > Proposed solution is to append the new site to the list instead of override > it. > > > Diffs > ----- > > ambari-web/app/views/common/quick_view_link_view.js e58e47f > ambari-web/test/views/common/quick_link_view_test.js 1c985a1 > > Diff: https://reviews.apache.org/r/42376/diff/ > > > Testing > ------- > > Added unit test. Local test passed. > 22968 tests complete (16 seconds) > 163 tests pending > > Manual testing done. > > Attached patch through apache. > > > Thanks, > > Zhe (Joe) Wang > >
