abstractdog commented on code in PR #427:
URL: https://github.com/apache/tez/pull/427#discussion_r2565040247


##########
tez-api/src/test/java/org/apache/tez/client/TestTezClient.java:
##########
@@ -447,6 +457,94 @@ public TezClientForTest testTezClient(boolean isSession, 
boolean shouldStop, Str
     return client;
   }
 
+  public void testTezClientReconnect(boolean isSession) throws Exception {
+    //Setup 1
+    Map<String, LocalResource> lrs = Maps.newHashMap();
+    String lrName1 = "LR1";
+    lrs.put(lrName1, LocalResource.newInstance(URL.newInstance("file", 
"localhost", 0, "/test"),
+            LocalResourceType.FILE, LocalResourceVisibility.PUBLIC, 1, 1));
+
+    //Client 1
+    TezClientForTest client = configureAndCreateTezClient(lrs, isSession, 
null);
+
+    //Submission Context 1
+    ArgumentCaptor<ApplicationSubmissionContext> captor = 
ArgumentCaptor.forClass(ApplicationSubmissionContext.class);
+    
when(client.mockYarnClient.getApplicationReport(client.mockAppId).getYarnApplicationState())
+            .thenReturn(YarnApplicationState.RUNNING);
+
+    //Client 1 start
+    client.start();

Review Comment:
   yeah, dagClient can and should be closed
   I cannot see separate close method in TezClient



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to