Skip to content

Commit 746961d

Browse files
authored
Fix long running test (#18754)
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.
1 parent 7bc2a66 commit 746961d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/openapi-generator-online/src/test/java/org/openapitools/codegen/online/api/GenApiControllerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ public void generateWIthForwardedHeaders() throws Exception {
124124
.andExpect(status().isOk())
125125
.andExpect(header().string(HttpHeaders.CONTENT_LENGTH, not(0)));
126126
}
127+
127128
@Test
128129
public void generateClientWithInvalidOpenAPIUrl() throws Exception {
129-
String invalidOpenAPIUrl = "https://test.com:1234/invalid_openapi.json";
130+
final String invalidOpenAPIUrl = "https://[::1]/invalid_openapi.json";
130131
mockMvc.perform(post("http://test.com:1234/api/gen/clients/java")
131132
.contentType(MediaType.APPLICATION_JSON)
132133
.content("{\"openAPIUrl\": \"" + invalidOpenAPIUrl + "\"}"))

0 commit comments

Comments
 (0)