Skip to content

Conversation

nosan
Copy link
Contributor

@nosan nosan commented Mar 6, 2019

management.server.port should be 0 when local.server.port has the same value and management.server.port has been defined in the different PropertySource

gh-16102

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 6, 2019
@nosan nosan changed the title management.server.port should be 0 Random management.server.port should not set to the same value as local.server.port Mar 6, 2019
@mbhave mbhave added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 8, 2019
@mbhave mbhave added this to the 2.1.x milestone Mar 8, 2019
Integer serverPort = getPropertyAsInteger(environment, SERVER_PORT_PROPERTY,
8080);
if (!managementPort.equals(serverPort)) {
if (!managementPort.equals(serverPort) || managementPort == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nosan I think we'd be able to achieve this by adding a || managementPort.equals(0) here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbhave thank you

the same value and `management.server.port` has been defined
in the different PropertySource

spring-projectsgh-16102
mbhave added a commit that referenced this pull request Mar 16, 2019
* pr/16108:
  Test server port shouldn't affect management port when random
@mbhave mbhave closed this in 2f3e5d6 Mar 16, 2019
@mbhave
Copy link
Contributor

mbhave commented Mar 16, 2019

Thanks @nosan. This is now on 2.1.x and master.

@mbhave mbhave modified the milestones: 2.1.x, 2.1.4 Mar 16, 2019
@nosan nosan deleted the gh-16102 branch March 20, 2019 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants