goiri commented on code in PR #4843:
URL: https://github.com/apache/hadoop/pull/4843#discussion_r965350196


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorREST.java:
##########
@@ -1056,4 +1065,65 @@ public void testGetAppActivities() throws IOException, 
InterruptedException {
     Assert.assertEquals(appId.toString(), 
appActivitiesInfo.getApplicationId());
     Assert.assertEquals(10, appActivitiesInfo.getAllocations().size());
   }
+
+  @Test
+  public void testListReservation() throws Exception {
+
+    // Add ReservationId In stateStore
+    ReservationId reservationId = ReservationId.newInstance(Time.now(), 1);
+    SubClusterId homeSubClusterId = subClusters.get(0);
+    ReservationHomeSubCluster reservationHomeSubCluster =
+        ReservationHomeSubCluster.newInstance(reservationId, homeSubClusterId);
+    AddReservationHomeSubClusterRequest request =
+        
AddReservationHomeSubClusterRequest.newInstance(reservationHomeSubCluster);
+    stateStore.addReservationHomeSubCluster(request);
+
+    // Call the listReservation method
+    String applyReservationId = reservationId.toString();
+    Response listReservationResponse =
+        
interceptor.listReservation(MockDefaultRequestInterceptorREST.QUEUE_DEDICATED_FULL,
+        applyReservationId, -1, -1, false, null);

Review Comment:
   Indentation



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to