slfan1989 commented on code in PR #8745:
URL: https://github.com/apache/hadoop/pull/8745#discussion_r4092192782


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestTimelineServerRequests.java:
##########
@@ -93,6 +93,42 @@ void testPutAndGetTimelineEntity() throws Exception {
     getEntity();
   }
 
+  @Test
+  void testOptionsDoesNotFailWhenWadlIsDisabled() {
+    String timelineUrl = 
String.format("http://%s:%d/ws/v1/timeline?user.name=foo";,
+        HOST, testTimelineServer.getPort());
+    String wadlUrl = 
String.format("http://%s:%d/application.wadl?user.name=foo";,
+        HOST, testTimelineServer.getPort());
+    Client client = ClientBuilder.newClient();
+    try {
+      Response about = client.target(timelineUrl)
+          .request(MediaType.APPLICATION_JSON).get();
+      try {
+        assertEquals(200, about.getStatus());
+      } finally {
+        about.close();
+      }
+
+      Response options = client.target(timelineUrl).request().options();
+      try {
+        assertTrue(options.getStatus() < 500,

Review Comment:
   Could we assert HTTP 200 for the OPTIONS response in this simple-auth test?
   
   The current `< 500` assertion also accepts responses such as 401, 403, 404, 
and 405, which would not demonstrate that the client's OPTIONS authentication 
probe still works. 
   
   An explicit success assertion would make this regression test stronger.



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