Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge the fix for #1551 into the combined fix build #1570

Merged
merged 2 commits into from Dec 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -16,7 +16,8 @@

package de.codecentric.boot.admin.server.ui;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.WebApplicationType;
Expand All @@ -31,21 +32,28 @@

public class AdminUiReactiveApplicationTest extends AbstractAdminUiApplicationTest {

private ConfigurableApplicationContext instance;
private static ConfigurableApplicationContext instance;

@BeforeEach
public void setUp() {
this.instance = new SpringApplicationBuilder().sources(TestAdminApplication.class)
.web(WebApplicationType.REACTIVE).run("--server.port=0",
private static Integer port;

@BeforeAll
public static void setUp() {
instance = new SpringApplicationBuilder().sources(TestAdminApplication.class).web(WebApplicationType.REACTIVE)
.run("--server.port=0",
"--spring.boot.admin.ui.extension-resource-locations=classpath:/META-INF/test-extensions/",
"--spring.boot.admin.ui.available-languages=de");

super.setUp(this.instance.getEnvironment().getProperty("local.server.port", Integer.class, 0));
port = instance.getEnvironment().getProperty("local.server.port", Integer.class, 0);
}

@AfterEach
public void shutdown() {
this.instance.close();
@AfterAll
public static void shutdown() {
instance.close();
}

@BeforeEach
public void setupEach() {
super.setUp(port);
}

@EnableAdminServer
Expand Down