Browse Source

HADOOP-18118. [Follow on] Fix test failure in TestHttpServer (#4900)

Signed-off-by: Erik Krogen <xkrogen@apache.org>
GuoPhilipse 2 years ago
parent
commit
620dd37712

+ 4 - 1
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServer.java

@@ -747,7 +747,10 @@ public class TestHttpServer extends HttpServerFunctionalTest {
   public void testBacklogSize2() throws Exception
   {
     Configuration conf = new Configuration();
-    assertEquals(500, conf.get(HttpServer2.HTTP_SOCKET_BACKLOG_SIZE_KEY));
+    HttpServer2 srv = createServer("test", conf);
+    List<ServerConnector> listeners = srv.getListeners();
+    ServerConnector listener = (ServerConnector)listeners.get(0);
+    assertEquals(500, listener.getAcceptQueueSize());
   }
 
   @Test