From 5a17fdc28dd8056631fda0b139e48c2c7380da07 Mon Sep 17 00:00:00 2001 From: Philzen Date: Thu, 23 May 2024 23:45:53 +0200 Subject: [PATCH] Fix long running test Depending on test exec environment, this test could linger around for ~8 minutes, b/c pinging test.com will not resolve and run into seveal timeouts. --- .../openapitools/codegen/online/api/GenApiControllerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator-online/src/test/java/org/openapitools/codegen/online/api/GenApiControllerTest.java b/modules/openapi-generator-online/src/test/java/org/openapitools/codegen/online/api/GenApiControllerTest.java index 394f09ac844d..c29405b7cfa8 100644 --- a/modules/openapi-generator-online/src/test/java/org/openapitools/codegen/online/api/GenApiControllerTest.java +++ b/modules/openapi-generator-online/src/test/java/org/openapitools/codegen/online/api/GenApiControllerTest.java @@ -124,9 +124,10 @@ public void generateWIthForwardedHeaders() throws Exception { .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.CONTENT_LENGTH, not(0))); } + @Test public void generateClientWithInvalidOpenAPIUrl() throws Exception { - String invalidOpenAPIUrl = "https://test.com:1234/invalid_openapi.json"; + final String invalidOpenAPIUrl = "https://[::1]/invalid_openapi.json"; mockMvc.perform(post("http://test.com:1234/api/gen/clients/java") .contentType(MediaType.APPLICATION_JSON) .content("{\"openAPIUrl\": \"" + invalidOpenAPIUrl + "\"}"))