tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-723. Fix missing mocks in TestVertexImpl post TEZ-688. (sseth)
Date Mon, 13 Jan 2014 19:44:03 GMT
Updated Branches:
  refs/heads/master fb9488cd5 -> b2490904e


TEZ-723. Fix missing mocks in TestVertexImpl post TEZ-688. (sseth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/b2490904
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/b2490904
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/b2490904

Branch: refs/heads/master
Commit: b2490904e060bbe75dc990f4379f6c337b8a7cf6
Parents: fb9488c
Author: Siddharth Seth <sseth@apache.org>
Authored: Mon Jan 13 11:43:33 2014 -0800
Committer: Siddharth Seth <sseth@apache.org>
Committed: Mon Jan 13 11:43:33 2014 -0800

----------------------------------------------------------------------
 .../org/apache/tez/dag/app/dag/impl/TestVertexImpl.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/b2490904/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
index ba4099b..2705741 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
@@ -41,6 +41,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
@@ -1076,9 +1077,17 @@ public class TestVertexImpl {
     dispatcher = new DrainDispatcher();
     appContext = mock(AppContext.class);
     TaskSchedulerEventHandler taskScheduler = mock(TaskSchedulerEventHandler.class);
+    UserGroupInformation ugi;
+    try {
+      ugi = UserGroupInformation.getCurrentUser();
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
     DAG dag = mock(DAG.class);
+    doReturn(ugi).when(dag).getDagUGI();
     doReturn(appAttemptId).when(appContext).getApplicationAttemptId();
     doReturn(dag).when(appContext).getCurrentDAG();
+    doReturn(new Credentials()).when(dag).getCredentials();
     doReturn(DAGPlan.getDefaultInstance()).when(dag).getJobPlan();
     doReturn(dagId).when(appContext).getCurrentDAGID();
     doReturn(dagId).when(dag).getID();


Mime
View raw message