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
2b8bc3fb
Commit
2b8bc3fb
authored
Dec 08, 2014
by
Dennis Schulte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HazelcastTest with proper network-config for CI
parent
c8a27d08
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
5 deletions
+32
-5
pom.xml
spring-boot-admin-server/pom.xml
+5
-0
AdminApplicationHazelcastTest.java
...codecentric/boot/admin/AdminApplicationHazelcastTest.java
+7
-5
hazelcast-test.xml
...g-boot-admin-server/src/test/resources/hazelcast-test.xml
+20
-0
No files found.
spring-boot-admin-server/pom.xml
View file @
2b8bc3fb
...
@@ -31,6 +31,11 @@
...
@@ -31,6 +31,11 @@
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.hazelcast
</groupId>
<artifactId>
hazelcast-spring
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.webjars
</groupId>
<groupId>
org.webjars
</groupId>
<artifactId>
bootstrap
</artifactId>
<artifactId>
bootstrap
</artifactId>
</dependency>
</dependency>
...
...
spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/AdminApplicationHazelcastTest.java
View file @
2b8bc3fb
...
@@ -33,6 +33,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
...
@@ -33,6 +33,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext
;
import
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext
;
import
org.springframework.boot.test.TestRestTemplate
;
import
org.springframework.boot.test.TestRestTemplate
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.ImportResource
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -51,19 +52,21 @@ public class AdminApplicationHazelcastTest {
...
@@ -51,19 +52,21 @@ public class AdminApplicationHazelcastTest {
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@EnableAdminServer
@EnableAdminServer
@ImportResource
(
"classpath:hazelcast-test.xml"
)
public
static
class
TestAdminApplication
{
public
static
class
TestAdminApplication
{
}
}
private
RestTemplate
template
=
new
TestRestTemplate
();
private
RestTemplate
template
=
new
TestRestTemplate
();
private
EmbeddedWebApplicationContext
instance1
;
private
EmbeddedWebApplicationContext
instance1
;
private
EmbeddedWebApplicationContext
instance2
;
private
EmbeddedWebApplicationContext
instance2
;
@Before
@Before
public
void
setup
()
{
public
void
setup
()
throws
InterruptedException
{
System
.
setProperty
(
"hazelcast.wait.seconds.before.join"
,
"0"
);
instance1
=
(
EmbeddedWebApplicationContext
)
SpringApplication
.
run
(
TestAdminApplication
.
class
,
new
String
[]
{
instance1
=
(
EmbeddedWebApplicationContext
)
SpringApplication
.
run
(
TestAdminApplication
.
class
,
new
String
[]
{
"--server.port=0"
,
"--spring.jmx.enabled=false"
});
"--server.port=0"
,
"--spring.jmx.enabled=false"
,
"--spring.boot.admin.hazelcast.enable=true"
});
instance2
=
(
EmbeddedWebApplicationContext
)
SpringApplication
.
run
(
TestAdminApplication
.
class
,
new
String
[]
{
instance2
=
(
EmbeddedWebApplicationContext
)
SpringApplication
.
run
(
TestAdminApplication
.
class
,
new
String
[]
{
"--server.port=0"
,
"--spring.jmx.enabled=false"
});
"--server.port=0"
,
"--spring.jmx.enabled=false"
,
"--spring.boot.admin.hazelcast.enable=true"
});
}
}
@After
@After
...
@@ -73,7 +76,6 @@ public class AdminApplicationHazelcastTest {
...
@@ -73,7 +76,6 @@ public class AdminApplicationHazelcastTest {
}
}
@Test
@Test
@Ignore
(
"Testcase does not work properly in all environments, so it's ignored in the build."
)
public
void
test
()
{
public
void
test
()
{
Application
app
=
new
Application
(
"http://127.0.0.1"
,
"Hazelcast Test"
);
Application
app
=
new
Application
(
"http://127.0.0.1"
,
"Hazelcast Test"
);
Application
app2
=
new
Application
(
"http://127.0.0.1:2"
,
"Hazelcast Test"
);
Application
app2
=
new
Application
(
"http://127.0.0.1:2"
,
"Hazelcast Test"
);
...
...
spring-boot-admin-server/src/test/resources/hazelcast-test.xml
0 → 100644
View file @
2b8bc3fb
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:hz=
"http://www.hazelcast.com/schema/spring"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring-3.3.xsd"
>
<hz:config
id=
"hazelcastConfig"
>
<hz:network
port=
"5701"
>
<hz:join>
<hz:multicast
enabled=
"false"
/>
<hz:tcp-ip
enabled=
"true"
>
<hz:member>
localhost
</hz:member>
</hz:tcp-ip>
</hz:join>
</hz:network>
</hz:config>
</beans>
\ No newline at end of file
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