Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
Project
Overview
Details
Activity
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
openSource
spring-boot-admin
Commits
c4203e5c
Commit
c4203e5c
authored
Jan 08, 2017
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests to run on OSX Sierra
parent
4bc9d3a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
AdminApplicationHazelcastTest.java
...codecentric/boot/admin/AdminApplicationHazelcastTest.java
+15
-5
No files found.
spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/AdminApplicationHazelcastTest.java
View file @
c4203e5c
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
*/
*/
package
de
.
codecentric
.
boot
.
admin
;
package
de
.
codecentric
.
boot
.
admin
;
import
static
java
.
util
.
Arrays
.
asList
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
...
@@ -42,6 +43,7 @@ import com.hazelcast.config.Config;
...
@@ -42,6 +43,7 @@ import com.hazelcast.config.Config;
import
com.hazelcast.config.EvictionPolicy
;
import
com.hazelcast.config.EvictionPolicy
;
import
com.hazelcast.config.ListConfig
;
import
com.hazelcast.config.ListConfig
;
import
com.hazelcast.config.MapConfig
;
import
com.hazelcast.config.MapConfig
;
import
com.hazelcast.config.TcpIpConfig
;
import
de.codecentric.boot.admin.config.EnableAdminServer
;
import
de.codecentric.boot.admin.config.EnableAdminServer
;
...
@@ -73,7 +75,7 @@ public class AdminApplicationHazelcastTest {
...
@@ -73,7 +75,7 @@ public class AdminApplicationHazelcastTest {
}
}
@Test
@Test
public
void
test
()
{
public
void
test
()
throws
Exception
{
// publish app on instance1
// publish app on instance1
ResponseEntity
<
Map
<
String
,
String
>>
postResponse
=
registerApp
(
"Hazelcast Test"
,
ResponseEntity
<
Map
<
String
,
String
>>
postResponse
=
registerApp
(
"Hazelcast Test"
,
"http://127.0.0.1/health"
,
instance1
);
"http://127.0.0.1/health"
,
instance1
);
...
@@ -151,11 +153,19 @@ public class AdminApplicationHazelcastTest {
...
@@ -151,11 +153,19 @@ public class AdminApplicationHazelcastTest {
public
static
class
TestAdminApplication
{
public
static
class
TestAdminApplication
{
@Bean
@Bean
public
Config
hazelcastConfig
()
{
public
Config
hazelcastConfig
()
{
return
new
Config
()
Config
config
=
new
Config
();
.
addMapConfig
(
new
MapConfig
(
"spring-boot-admin-application-store"
)
.
setBackupCount
(
1
).
setEvictionPolicy
(
EvictionPolicy
.
NONE
))
config
.
addMapConfig
(
new
MapConfig
(
"spring-boot-admin-application-store"
)
.
addListConfig
(
new
ListConfig
(
"spring-boot-admin-application-store"
)
.
setBackupCount
(
1
).
setEvictionPolicy
(
EvictionPolicy
.
NONE
));
config
.
addListConfig
(
new
ListConfig
(
"spring-boot-admin-application-store"
)
.
setBackupCount
(
1
).
setMaxSize
(
1000
));
.
setBackupCount
(
1
).
setMaxSize
(
1000
));
config
.
getNetworkConfig
().
getJoin
().
getMulticastConfig
().
setEnabled
(
false
);
TcpIpConfig
tcpIpConfig
=
config
.
getNetworkConfig
().
getJoin
().
getTcpIpConfig
();
tcpIpConfig
.
setEnabled
(
true
);
tcpIpConfig
.
setMembers
(
asList
(
"127.0.0.1"
));
return
config
;
}
}
}
}
...
...
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