Repository: tez Updated Branches: refs/heads/branch-0.8 91bc21a3e -> e6ba30631
TEZ-3433. Tez UI: Searching using wrong ID causes error in all DAGs page (Sushmitha Sreenivasan via sree) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/e6ba3063 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/e6ba3063 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/e6ba3063 Branch: refs/heads/branch-0.8 Commit: e6ba306316dc2bc11033a0c9e782dc2702ff6428 Parents: 91bc21a Author: Sreenath Somarajapuram <[email protected]> Authored: Mon Oct 3 14:03:20 2016 +0530 Committer: Sreenath Somarajapuram <[email protected]> Committed: Mon Oct 3 14:03:20 2016 +0530 ---------------------------------------------------------------------- CHANGES.txt | 1 + tez-ui2/src/main/webapp/app/routes/dags.js | 2 ++ .../main/webapp/tests/unit/routes/dags-test.js | 23 +++++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/e6ba3063/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 576435c..d7cbf9d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -31,6 +31,7 @@ ALL CHANGES: TEZ-1248. Reduce slow-start should special case 1 reducer runs. TEZ-3370. Tez UI: Display the log link as N/A if the app does not provide a log link TEZ-3398. Tez UI: Bread crumb link to Application from Application details dag/configuration tab is broken + TEZ-3433. Tez UI: Searching using wrong ID causes error in all DAGs page Release 0.8.4: 2016-07-08 http://git-wip-us.apache.org/repos/asf/tez/blob/e6ba3063/tez-ui2/src/main/webapp/app/routes/dags.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dags.js b/tez-ui2/src/main/webapp/app/routes/dags.js index 33366c8..e6a8711 100644 --- a/tez-ui2/src/main/webapp/app/routes/dags.js +++ b/tez-ui2/src/main/webapp/app/routes/dags.js @@ -86,6 +86,8 @@ export default AbstractRoute.extend({ that.set("loadedRecords", []); loader = this.get("loader").queryRecord('dag', query.dagID, {reload: true}).then(function (record) { return [record]; + },function () { + return []; }); } else { http://git-wip-us.apache.org/repos/asf/tez/blob/e6ba3063/tez-ui2/src/main/webapp/tests/unit/routes/dags-test.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/tests/unit/routes/dags-test.js b/tez-ui2/src/main/webapp/tests/unit/routes/dags-test.js index dfa8223..b56e193 100644 --- a/tez-ui2/src/main/webapp/tests/unit/routes/dags-test.js +++ b/tez-ui2/src/main/webapp/tests/unit/routes/dags-test.js @@ -88,16 +88,37 @@ test('load test', function(assert) { })); } }; + }, + queryRecord: function (type, dagID, options) { + assert.equal(type, "dag"); + assert.equal(options.reload, true); + if (dagID === querySuccess.dagID) { + return Ember.RSVP.resolve(Ember.Object.create()); + } else { + return Ember.RSVP.reject(new Error("Failed in Reject")); + } } } }), query = { limit: 5 + }, + querySuccess = { + dagID :'dag_123' + }, + queryFailure = { + dagID :'dag_456' }; - assert.expect(3 + 1); + assert.expect(8 + 2); route.load(null, query); + route.load(null, querySuccess).then(function () { + assert.ok(true); + }); + route.load(null, queryFailure).then(function (data) { + assert.equal(data.length,0); + }); }); test('loadNewPage test', function(assert) {
