Red Hat Bugzilla – Bug 1025705
JBossws MemoryBufferRecorderTestCase fails for IPv6 address in full format
Last modified: 2014-10-25 08:27:31 EDT
Description of problem:
org.jboss.test.ws.management.recording.MemoryBufferRecorderTestCase#testGetRecordsByClientHost is failing when serverhost is [0:0:0:0:0:0:0:1]
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run test from jbossws cxf stack version 4.2.2.Final-redhat-2 with EAP 6.2.0.ER7 with following setup
AS_STARTUP_PARAMS="-b=0:0:0:0:0:0:0:1 -bmanagement=0:0:0:0:0:0:0:1 -bunsecure=0:0:0:0:0:0:0:1"
BIND_PARAMS="-Djboss.bind.address=[0:0:0:0:0:0:0:1] -Djbossws.deployer.host=0:0:0:0:0:0:0:1 -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
The test was passing in 6.2.0.ER6, but commit 17989 broke it (see https://source.jboss.org/changelog/JBossWS?cs=17989)
Offending line is line 136
if ("[::1]".equals(host)) host = "0:0:0:0:0:0:0:1"; // IPv6 hack
because value of host is "[0:0:0:0:0:0:0:1]", the enclosing brackets are not stripped of.
The line should be replaced for test if address is IPv6 and if yes strip enclosing brackets and expand to full format if it is in short one, so the test would work with different IPv6 addresses then [::1] and [0:0:0:0:0:0:0:1] as well
> Petr skkar ...wrote
> I've sent to SVN commit .
> It fixes the issue, when the server is started with option -b=[::1] and the
> tests are failing complaing the host is not in format [::1].
> The "problem" is caused by current implementation of parameters parsing in
> eap, when -b=[::1] is converted to -Djboss.bind.address=::1, thus we can not
> satisfy your requirement without stopping using -b and setting directly via
> -Djboss.bind.address. That would meant for us to change all scripts / jobs.
>  https://source.jboss.org/changelog/JBossWS?cs=18545
verified fixed in EAP 6.3.0.DR6