Commit c95521e8 by Johannes Edmeier

desperate attempt to improve execution time and stability of tests in ci

parent ae8596cd
......@@ -111,7 +111,7 @@ public class AbstractInstancesProxyController {
log.trace("No Endpoint found for Proxy-Request for instance {} with URL '{}'", instance.getId(), uri);
return ClientResponse.create(HttpStatus.NOT_FOUND, strategies).build();
})).onErrorResume(IOException.class, ex -> Mono.fromSupplier(() -> {
log.trace("Error for Proxy-Request for instance {} with URL '{}' timed out", instance.getId(), uri, ex);
log.trace("Error for Proxy-Request for instance {} with URL '{}' errored", instance.getId(), uri, ex);
return ClientResponse.create(HttpStatus.BAD_GATEWAY, strategies).build();
})).onErrorResume(ConnectException.class, ex -> Mono.fromSupplier(() -> {
log.trace("Error for Proxy-Request for instance {} with URL '{}' timed out", instance.getId(), uri, ex);
......
......@@ -19,16 +19,28 @@ package de.codecentric.boot.admin.server.web.reactive;
import de.codecentric.boot.admin.server.AdminReactiveApplicationTest;
import de.codecentric.boot.admin.server.web.AbstractInstancesProxyControllerIntegrationTest;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerIntegrationTest {
@Override
protected ConfigurableApplicationContext setupContext() {
return new SpringApplicationBuilder().sources(AdminReactiveApplicationTest.TestAdminApplication.class)
.web(WebApplicationType.REACTIVE)
.run("--server.port=0", "--eureka.client.enabled=false",
"--spring.boot.admin.monitor.read-timeout=3000");
private static ConfigurableApplicationContext context;
@BeforeClass
public static void setUpCpntext() {
context = new SpringApplicationBuilder().sources(AdminReactiveApplicationTest.TestAdminApplication.class)
.web(WebApplicationType.REACTIVE)
.run("--server.port=0", "--eureka.client.enabled=false",
"--spring.boot.admin.monitor.read-timeout=5000");
AbstractInstancesProxyControllerIntegrationTest.setUpClient(context);
}
@AfterClass
public static void tearDownContext() {
if (context != null) {
context.close();
}
}
}
......@@ -19,16 +19,28 @@ package de.codecentric.boot.admin.server.web.servlet;
import de.codecentric.boot.admin.server.AdminServletApplicationTest;
import de.codecentric.boot.admin.server.web.AbstractInstancesProxyControllerIntegrationTest;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
public class InstancesProxyControllerIntegrationTest extends AbstractInstancesProxyControllerIntegrationTest {
@Override
protected ConfigurableApplicationContext setupContext() {
return new SpringApplicationBuilder().sources(AdminServletApplicationTest.TestAdminApplication.class)
.web(WebApplicationType.SERVLET)
.run("--server.port=0", "--eureka.client.enabled=false",
"--spring.boot.admin.monitor.read-timeout=3000");
private static ConfigurableApplicationContext context;
@BeforeClass
public static void setUpCpntext() {
context = new SpringApplicationBuilder().sources(AdminServletApplicationTest.TestAdminApplication.class)
.web(WebApplicationType.SERVLET)
.run("--server.port=0", "--eureka.client.enabled=false",
"--spring.boot.admin.monitor.read-timeout=5000");
AbstractInstancesProxyControllerIntegrationTest.setUpClient(context);
}
@AfterClass
public static void tearDownContext() {
if (context != null) {
context.close();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment