Commit 77bdf992 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish "Create HazelCastClient if necessary"

See gh-20109
parent 67dd9ad5
......@@ -16,6 +16,7 @@
package org.springframework.boot.autoconfigure.hazelcast;
import com.hazelcast.client.HazelcastClient;
import com.hazelcast.client.config.ClientConfig;
import com.hazelcast.client.impl.clientside.HazelcastClientProxy;
import com.hazelcast.config.Config;
......@@ -125,7 +126,8 @@ class HazelcastAutoConfigurationClientTests {
}
@Test
void clientConfigWithInstanceName() {
void clientConfigWithInstanceNameCreatesClientIfNecessary() {
assertThat(HazelcastClient.getHazelcastClientByName("spring-boot")).isNull();
this.contextRunner
.withPropertyValues("spring.hazelcast.config=classpath:org/springframework/"
+ "boot/autoconfigure/hazelcast/hazelcast-client-instance.xml")
......
......@@ -4,4 +4,5 @@
xsi:schemaLocation="http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.12.xsd">
<instance-name>spring-boot</instance-name>
</hazelcast-client>
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