Skip to content

spring: Bind absolute-URI client test to an ephemeral port - #6921

Merged
ikhoon merged 1 commit into
line:mainfrom
kalayciburak:fix/spring7-absolute-uri-ephemeral-port
Aug 19, 2026
Merged

ikhoon merged 1 commit into
line:mainfrom
kalayciburak:fix/spring7-absolute-uri-ephemeral-port

Conversation

@kalayciburak

Copy link
Copy Markdown
Contributor

Motivation:

ArmeriaHttpExchangeAdapterTest.greetingWithAbsoluteUri binds a dedicated server to the hardcoded port 65493. When that port is already in use, the test fails with ServerPortBindException (Address already in use) instead of covering the absolute-URI path.

Modifications:

  • Bind the dedicated server to an ephemeral port (http(0)).
  • Resolve http://foo.com:${absoluteUri.port}/greeting through HttpServiceProxyFactory.embeddedValueResolver.
  • Close the dedicated server in finally.

Result:

greetingWithAbsoluteUri failed with ServerPortBindException when
the hardcoded port 65493 was already in use.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jrhee17 jrhee17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 👍

@jrhee17 jrhee17 added this to the 1.42.0 milestone Aug 18, 2026

@minwoox minwoox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ikhoon ikhoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ikhoon
ikhoon merged commit f79b68d into line:main Aug 19, 2026
21 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: com.linecorp.armeria.spring.client.ArmeriaHttpExchangeAdapterTest.greetingWithAbsoluteUri()

4 participants