You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2020/03/04 22:11:00 UTC

[jira] [Comment Edited] (CASSANDRA-15622) Unit tests throw UnknownHostException trying to use `InetAddress.getLocalHost()` instead of `FBUtilities.getLocalAddress()`

    [ https://issues.apache.org/jira/browse/CASSANDRA-15622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17051658#comment-17051658 ] 

Michael Semb Wever edited comment on CASSANDRA-15622 at 3/4/20, 10:10 PM:
--------------------------------------------------------------------------

initial patch against [cassandra-2.2|https://github.com/apache/cassandra/compare/cassandra-2.2...thelastpickle:mck/cassandra-2.2_15622]


was (Author: michaelsembwever):
initial patch at [here|https://github.com/apache/cassandra/compare/cassandra-2.2...thelastpickle:mck/cassandra-2.2_15622]

> Unit tests throw UnknownHostException trying to use `InetAddress.getLocalHost()` instead of `FBUtilities.getLocalAddress()`
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15622
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15622
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/unit
>            Reporter: Michael Semb Wever
>            Assignee: Michael Semb Wever
>            Priority: Normal
>             Fix For: 2.2.x, 3.0.x, 3.11.x, 4.x
>
>
> Many of the unit tests in Jenkins fail because of the use of {{`InetAddress.getLocalHost()`}} in the test classes.
> The Jenkins agents needs a public ipaddress (and a hostname associated to it) so the Jenkins master can connect to them (agents can be hosted externally, by donating third-parties).
> The call to {{`InetAddress.getLocalHost()`}} then resolves this public hostname.
> This is not listed in {{`/etc/hosts`}}, and we don't want it to be either (in case of accidental external port opening). (This is also ASF policy on this infrastructure.)
> The unit test code needs to replace these code occurrences with the call to {{`FBUtilities.getLocalAddress()`}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org