You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2016/10/03 08:21:05 UTC
tez git commit: TEZ-3433. Tez UI: Searching using wrong ID causes
error in all DAGs page (Sushmitha Sreenivasan via sree)
Repository: tez
Updated Branches:
refs/heads/master 5c2f893ab -> ad1fb6216
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/ad1fb621
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/ad1fb621
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/ad1fb621
Branch: refs/heads/master
Commit: ad1fb62160c87cfb57ac4c80b16e4bcd379bee33
Parents: 5c2f893
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Mon Oct 3 13:49:11 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Mon Oct 3 13:49:11 2016 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
tez-ui/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/ad1fb621/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index db57a61..1c410e1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -106,6 +106,7 @@ ALL CHANGES:
TEZ-3333. Tez UI: Handle cases where Vertex/Task/Task Attempt data is missing
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.5: Unreleased
http://git-wip-us.apache.org/repos/asf/tez/blob/ad1fb621/tez-ui/src/main/webapp/app/routes/dags.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/routes/dags.js b/tez-ui/src/main/webapp/app/routes/dags.js
index 2247637..dae27b2 100644
--- a/tez-ui/src/main/webapp/app/routes/dags.js
+++ b/tez-ui/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/ad1fb621/tez-ui/src/main/webapp/tests/unit/routes/dags-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/routes/dags-test.js b/tez-ui/src/main/webapp/tests/unit/routes/dags-test.js
index 39a3300..146cdd2 100644
--- a/tez-ui/src/main/webapp/tests/unit/routes/dags-test.js
+++ b/tez-ui/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) {