Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
77bdf992
Commit
77bdf992
authored
Feb 10, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Create HazelCastClient if necessary"
See gh-20109
parent
67dd9ad5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
HazelcastAutoConfigurationClientTests.java
...gure/hazelcast/HazelcastAutoConfigurationClientTests.java
+3
-1
hazelcast-client-instance.xml
...oot/autoconfigure/hazelcast/hazelcast-client-instance.xml
+1
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java
View file @
77bdf992
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
hazelcast
;
package
org
.
springframework
.
boot
.
autoconfigure
.
hazelcast
;
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
;
...
@@ -125,7 +126,8 @@ class HazelcastAutoConfigurationClientTests {
...
@@ -125,7 +126,8 @@ class HazelcastAutoConfigurationClientTests {
}
}
@Test
@Test
void
clientConfigWithInstanceName
()
{
void
clientConfigWithInstanceNameCreatesClientIfNecessary
()
{
assertThat
(
HazelcastClient
.
getHazelcastClientByName
(
"spring-boot"
)).
isNull
();
this
.
contextRunner
this
.
contextRunner
.
withPropertyValues
(
"spring.hazelcast.config=classpath:org/springframework/"
.
withPropertyValues
(
"spring.hazelcast.config=classpath:org/springframework/"
+
"boot/autoconfigure/hazelcast/hazelcast-client-instance.xml"
)
+
"boot/autoconfigure/hazelcast/hazelcast-client-instance.xml"
)
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-instance.xml
View file @
77bdf992
...
@@ -4,4 +4,5 @@
...
@@ -4,4 +4,5 @@
xsi:schemaLocation=
"http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.12.xsd"
>
xsi:schemaLocation=
"http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.12.xsd"
>
<instance-name>
spring-boot
</instance-name>
<instance-name>
spring-boot
</instance-name>
</hazelcast-client>
</hazelcast-client>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment