mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '3.2.x'
Closes gh-40850
This commit is contained in:
commit
63515012d8
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -28,6 +28,7 @@ import com.hazelcast.client.HazelcastClient;
|
|||||||
import com.hazelcast.client.config.ClientConfig;
|
import com.hazelcast.client.config.ClientConfig;
|
||||||
import com.hazelcast.client.impl.clientside.HazelcastClientProxy;
|
import com.hazelcast.client.impl.clientside.HazelcastClientProxy;
|
||||||
import com.hazelcast.config.Config;
|
import com.hazelcast.config.Config;
|
||||||
|
import com.hazelcast.config.NetworkConfig;
|
||||||
import com.hazelcast.core.Hazelcast;
|
import com.hazelcast.core.Hazelcast;
|
||||||
import com.hazelcast.core.HazelcastInstance;
|
import com.hazelcast.core.HazelcastInstance;
|
||||||
import org.assertj.core.api.Condition;
|
import org.assertj.core.api.Condition;
|
||||||
@ -64,7 +65,9 @@ class HazelcastAutoConfigurationClientTests {
|
|||||||
@BeforeAll
|
@BeforeAll
|
||||||
static void init() {
|
static void init() {
|
||||||
Config config = Config.load();
|
Config config = Config.load();
|
||||||
config.getNetworkConfig().setPort(0);
|
NetworkConfig networkConfig = config.getNetworkConfig();
|
||||||
|
networkConfig.setPort(0);
|
||||||
|
networkConfig.setPublicAddress("localhost");
|
||||||
hazelcastServer = Hazelcast.newHazelcastInstance(config);
|
hazelcastServer = Hazelcast.newHazelcastInstance(config);
|
||||||
InetSocketAddress inetSocketAddress = (InetSocketAddress) hazelcastServer.getLocalEndpoint().getSocketAddress();
|
InetSocketAddress inetSocketAddress = (InetSocketAddress) hazelcastServer.getLocalEndpoint().getSocketAddress();
|
||||||
endpointAddress = inetSocketAddress.getHostString() + ":" + inetSocketAddress.getPort();
|
endpointAddress = inetSocketAddress.getHostString() + ":" + inetSocketAddress.getPort();
|
||||||
|
Loading…
Reference in New Issue
Block a user