Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
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-cloud-netflix
Commits
24288691
Commit
24288691
authored
Jan 04, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test in build server VM
parent
a5d2d2ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
EurekaInstanceConfigBeanTests.java
...k/cloud/netflix/eureka/EurekaInstanceConfigBeanTests.java
+6
-4
No files found.
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBeanTests.java
View file @
24288691
...
@@ -111,8 +111,9 @@ public class EurekaInstanceConfigBeanTests {
...
@@ -111,8 +111,9 @@ public class EurekaInstanceConfigBeanTests {
public
void
testPerferIpAddress
()
throws
Exception
{
public
void
testPerferIpAddress
()
throws
Exception
{
addEnvironment
(
context
,
"eureka.instance.preferIpAddress:true"
);
addEnvironment
(
context
,
"eureka.instance.preferIpAddress:true"
);
setupContext
();
setupContext
();
assertTrue
(
"Wrong hostname: "
+
getInstanceConfig
().
getHostname
(),
EurekaInstanceConfigBean
instance
=
getInstanceConfig
();
getInstanceConfig
().
getHostname
().
startsWith
(
"127.0."
));
assertTrue
(
"Wrong hostname: "
+
instance
.
getHostname
(),
getInstanceConfig
().
getHostname
().
equals
(
instance
.
getIpAddress
()));
}
}
...
@@ -120,8 +121,9 @@ public class EurekaInstanceConfigBeanTests {
...
@@ -120,8 +121,9 @@ public class EurekaInstanceConfigBeanTests {
public
void
testPerferIpAddressInDatacenter
()
throws
Exception
{
public
void
testPerferIpAddressInDatacenter
()
throws
Exception
{
addEnvironment
(
context
,
"eureka.instance.preferIpAddress:true"
);
addEnvironment
(
context
,
"eureka.instance.preferIpAddress:true"
);
setupContext
();
setupContext
();
String
id
=
((
UniqueIdentifier
)
getInstanceConfig
().
getDataCenterInfo
()).
getId
();
EurekaInstanceConfigBean
instance
=
getInstanceConfig
();
assertTrue
(
"Wrong hostname: "
+
id
,
id
.
startsWith
(
"127.0."
));
String
id
=
((
UniqueIdentifier
)
instance
.
getDataCenterInfo
()).
getId
();
assertTrue
(
"Wrong hostname: "
+
id
,
id
.
equals
(
instance
.
getIpAddress
()));
}
}
...
...
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