Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing org.opensearch.common.network.InetAddressesTests.testForStringIPv6WithScopeIdInput #1913

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

reta
Copy link
Collaborator

@reta reta commented Jan 14, 2022

Signed-off-by: Andriy Redko andriy.redko@aiven.io

Description

There is a real possibility that loopback interface has no IPv6 address assigned (fe IPv6 is disabled, ...) but the test blindly assumes that loopback interface always has IPv6 address and as such, fails with java.net.UnknownHostException: no scope_id found if that is not the case.

org.opensearch.common.network.InetAddressesTests > testForStringIPv6WithScopeIdInput FAILED
243 | java.net.UnknownHostException: no scope_id found
244 | at __randomizedtesting.SeedInfo.seed([D7519A98383FCD86:F581D4F66795B2D5]:0)
245 | at java.base/java.net.Inet6Address.deriveNumericScope(Inet6Address.java:538)
246 | at java.base/java.net.Inet6Address$Inet6AddressHolder.init(Inet6Address.java:247)
247 | at java.base/java.net.Inet6Address.initif(Inet6Address.java:495)
248 | at java.base/java.net.Inet6Address.initstr(Inet6Address.java:485)
249 | at java.base/java.net.Inet6Address.<init>(Inet6Address.java:404)
250 | at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1356)
251 | at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301)
252 | at java.base/java.net.InetAddress.getByName(InetAddress.java:1251)
253 | at org.opensearch.common.network.InetAddressesTests.testForStringIPv6WithScopeIdInput(InetAddressesTests.java:157)
254

Issues Resolved

Closes #1887

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…IPv6WithScopeIdInput

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta requested a review from a team as a code owner January 14, 2022 19:33
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 6cea708
Log 1929

Reports 1929

Copy link
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this.

@nknize nknize added :test Adding or fixing a test bug Something isn't working v2.0.0 Version 2.0.0 pending backport Identifies an issue or PR that still needs to be backported labels Jan 14, 2022
@andrross andrross merged commit dd8ad29 into opensearch-project:main Jan 14, 2022
reta added a commit to reta/OpenSearch that referenced this pull request Jan 14, 2022
…IPv6WithScopeIdInput (opensearch-project#1913)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
nknize pushed a commit that referenced this pull request Jan 15, 2022
…IPv6WithScopeIdInput (#1913) (#1914)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@owaiskazi19 owaiskazi19 removed the pending backport Identifies an issue or PR that still needs to be backported label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :test Adding or fixing a test v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] org.opensearch.common.network.InetAddressesTests.testForStringIPv6WithScopeIdInput
5 participants