|
|
@ -50,15 +50,13 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class ConditionalOnReflectRefreshTypeTest {
|
|
|
|
public class ConditionalOnReflectRefreshTypeTest {
|
|
|
|
|
|
|
|
|
|
|
|
private static final int PORT = 18093;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static ServerSocket serverSocket;
|
|
|
|
private static ServerSocket serverSocket;
|
|
|
|
|
|
|
|
|
|
|
|
@BeforeClass
|
|
|
|
@BeforeClass
|
|
|
|
public static void before() {
|
|
|
|
public static void before() {
|
|
|
|
new Thread(() -> {
|
|
|
|
new Thread(() -> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
serverSocket = new ServerSocket(PORT);
|
|
|
|
serverSocket = new ServerSocket(8093);
|
|
|
|
serverSocket.accept();
|
|
|
|
serverSocket.accept();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (IOException e) {
|
|
|
|
catch (IOException e) {
|
|
|
@ -83,8 +81,7 @@ public class ConditionalOnReflectRefreshTypeTest {
|
|
|
|
.withPropertyValues("server.port=" + 8080)
|
|
|
|
.withPropertyValues("server.port=" + 8080)
|
|
|
|
.withPropertyValues("spring.cloud.polaris.address=grpc://127.0.0.1:10081")
|
|
|
|
.withPropertyValues("spring.cloud.polaris.address=grpc://127.0.0.1:10081")
|
|
|
|
.withPropertyValues("spring.cloud.polaris.config.refresh-type=" + RefreshType.REFLECT)
|
|
|
|
.withPropertyValues("spring.cloud.polaris.config.refresh-type=" + RefreshType.REFLECT)
|
|
|
|
.withPropertyValues("spring.cloud.polaris.config.enabled=true")
|
|
|
|
.withPropertyValues("spring.cloud.polaris.config.enabled=true");
|
|
|
|
.withPropertyValues("spring.cloud.polaris.config.port=" + PORT);
|
|
|
|
|
|
|
|
contextRunner.run(context -> {
|
|
|
|
contextRunner.run(context -> {
|
|
|
|
assertThat(context).hasSingleBean(PlaceholderHelper.class);
|
|
|
|
assertThat(context).hasSingleBean(PlaceholderHelper.class);
|
|
|
|
assertThat(context).hasSingleBean(SpringValueRegistry.class);
|
|
|
|
assertThat(context).hasSingleBean(SpringValueRegistry.class);
|
|
|
|