From a4cb1b2d6fbff7c261ee9367853f83686c3bb6d1 Mon Sep 17 00:00:00 2001 From: Pranav Rastogi Date: Sun, 29 Jan 2023 20:26:24 -0800 Subject: [PATCH] Update HttpClientTest.java Updating tests --- .../jhttp/functional/HttpClientTest.java | 203 ------------------ 1 file changed, 203 deletions(-) diff --git a/src/test/java/io/harness/jhttp/functional/HttpClientTest.java b/src/test/java/io/harness/jhttp/functional/HttpClientTest.java index e484c12..6184167 100644 --- a/src/test/java/io/harness/jhttp/functional/HttpClientTest.java +++ b/src/test/java/io/harness/jhttp/functional/HttpClientTest.java @@ -60,209 +60,6 @@ public void testReflection() throws IOException { reflections.getSubTypesOf(Object.class); } - @Test - public void testDirectoryIndex() throws IOException, InterruptedException { - Thread.sleep(10000); // sleep 10 sec - testRequest("/directory1", "/http-server/server-root/directory1/index.html"); - } - - @Test - public void testStaticFile() throws IOException , InterruptedException { - Thread.sleep(20000); // sleep 20 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile123() throws IOException , InterruptedException{ - Thread.sleep(10000); // sleep 10 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile1234() throws IOException , InterruptedException { - Thread.sleep(10000); // sleep 10 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile2234() throws IOException , InterruptedException { - Thread.sleep(16000); // sleep 16 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile2341() throws IOException, InterruptedException { - Thread.sleep(10000); // sleep 10 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile6341() throws IOException, InterruptedException { - Thread.sleep(10000); // sleep 10 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile6141() throws IOException, InterruptedException { - Thread.sleep(10000); // sleep 10 sec - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile6121() throws IOException, InterruptedException { - Thread.sleep(12000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile61212() throws IOException, InterruptedException { - Thread.sleep(9000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile61272() throws IOException, InterruptedException { - Thread.sleep(21000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile7777() throws IOException, InterruptedException { - Thread.sleep(4000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile07776() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile01776() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile02776() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile03776() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile04776() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile0576() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - - @Test - public void testStaticFile0676() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile0776() throws IOException, InterruptedException { - Thread.sleep(2000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile0876() throws IOException, InterruptedException { - Thread.sleep(6000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile0976() throws IOException, InterruptedException { - Thread.sleep(1000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile09176() throws IOException, InterruptedException { - Thread.sleep(1000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile09276() throws IOException, InterruptedException { - Thread.sleep(1000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile09376() throws IOException, InterruptedException { - Thread.sleep(1000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - - @Test - public void testStaticFile09476() throws IOException, InterruptedException { - Thread.sleep(1000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void testStaticFile09576() throws IOException, InterruptedException { - Thread.sleep(1000); - testRequest("/file1.html", "/http-server/server-root/file1.html"); - testRequest("/file2.html", "/http-server/server-root/file2.html"); - } - - @Test - public void test404() throws IOException { - testRequest("/invalid-file.html", "/http-server/404.html", 404); - } private void testRequest(String uri, String responsePath) throws ParseException, IOException { testRequest(uri, responsePath, 200);