[jboss-jira] [JBoss JIRA] (AS7-4011) TS: Bad approach used as fallback mechanism for gathering IP address

Ondrej Zizka (JIRA) jira-events at lists.jboss.org
Mon Aug 6 11:06:07 EDT 2012


     [ https://issues.jboss.org/browse/AS7-4011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ondrej Zizka resolved AS7-4011.
-------------------------------

    Resolution: Duplicate Issue


JBPAPP-8337
                
> TS: Bad approach used as fallback mechanism for gathering IP address
> --------------------------------------------------------------------
>
>                 Key: AS7-4011
>                 URL: https://issues.jboss.org/browse/AS7-4011
>             Project: Application Server 7
>          Issue Type: Feature Request
>          Components: Test Suite
>    Affects Versions: 7.1.1.Final
>            Reporter: Pavel Janousek
>            Assignee: Ondrej Zizka
>            Priority: Minor
>
> There are several places in TS where we can see similar code like this:
> {code}
> static final String someIPproperty = System.getProperty("<some key>", "localhost"); 
> {code}
> or
> {code}
> static final String someIPproperty = System.getProperty("<some key>", "127.0.0.1"); 
> {code}
> As you can see above, this fallback mechanism is bound in this case (key value isn't found) to IPv4 only IP address at all. This approach is bad because we can run in other network stack - IPv6 is presented in these days - and in this case the such testcase fails with some strange error due to this issue.
> I think we have two option how to resolve this issue:
> # Don't use fallback mechanism at all and fix (= remove) them in present testcases
> # Create auxiliary class which return 127.0.0.1 or ::1 string (but not string "localhost" because we can't be sure how it is translated (*))
> (*) common setup in Linux is to translate localhost -> 127.0.0.1 and localhost6 -> ::1
> Ad 1) I prefer this option because some forget/miss setting is very easy to catch
> Ad 2) This auxiliary class should need to make some magic decision in which IP network stack mode we are now running and return IPv4 or IPv6 lookpack address accordingly.
> I've been asking for decision in jboss-as7-dev mailing list [[1|http://lists.jboss.org/pipermail/jboss-as7-dev/2012-March/005449.html]] and we should wait for feedback from developers for final decision how to fix this issue.
> [1] http://lists.jboss.org/pipermail/jboss-as7-dev/2012-March/005449.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list