Hardcoded localhost - leftovers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hardcoded localhost - leftovers

Ondrej Zizka
Hi all,

there are still some tests containing hard-coded localhost.
If you happen to be the author/culprit, please check if the tests should be updated (most likely it should) to use an appropriate dynamic mechanism to get the right address, and update it.

    @ArquillianResource URL url;
    @ArquillianResource ManagementClient mc;
    @ContainerResource private ManagementClient mc;

The values in annotations will probably need some trick like this:
https://github.com/jbossas/jboss-as/commit/a2b0b7b4220bd3e781389b7262f46a996c3360cc
Or, if no other way, using javassist (or byteman) to inject a constant into a static field and use that in the annotation.

Thanks to Stuart, Richard, and all who contributed to this.

Ondra


testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/mgmt/datasource/DataSourceOperationsUnitTestCase.java:    
               MBeanServerConnection mbeanServer = JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:remoting-jmx://127.0.0.1:9999")).getMBeanServerConnection();

testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        final Object iiopObj = context.lookup("corbaname:iiop:localhost:3528#test/IIOPNamingBean");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "iiop://localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "iiop://localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "corbaloc::localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        final Object iiopObj = context.lookup("corbaname:iiop:localhost:3528#bean/custom/name/IIOPNamingBean");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/iiop/naming/IIOPNamingTestCase.java:        prope.put(Context.PROVIDER_URL, "iiop://localhost:3528");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jmx/ModelControllerMBeanTestCase.java:    static final String HOST = "localhost";
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jmx/ModelControllerMBeanTestCase.java:        client = ModelControllerClient.Factory.create("localhost", 9999, getCallbackHandler());
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/osgi/jaxrs/RestEasyIntegrationTestCase.java:        String reqPath = "http://" + formatPossibleIpv6Address(System.getProperty("test.bind.address", "localhost")) + ":8080/resteasy-osgi-client/rest/echo
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/DatabaseLoginModuleTestCase.java:            conn = DriverManager.getConnection("jdbc:h2:tcp://localhost/mem:test" + depNum, "sa", "sa");
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep1.java:   url = "jdbc:h2:tcp://localhost/mem:test1"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep2.java:   url = "jdbc:h2:tcp://localhost/mem:test2"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep3.java:   url = "jdbc:h2:tcp://localhost/mem:test3"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/loginmodules/common/servlets/SecuredServletWithDBSetupForDep4.java:   url = "jdbc:h2:tcp://localhost/mem:test4"
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/web/security/cert/WebSecurityCERTTestCase.java:    protected final String URL = "https://localhost:8380/" + getContextPath() + "/secured/";
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/web/security/cert/WebSecurityCERTTestCase.java:    protected final String URL = "https://localhost:8380/" + getContextPath() + "/secured/";
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/web/security/tg/TransportGuaranteeTestCase.java:        FileUtils.copyURLToFile(tccl.getResource("web/sec/tg/localhost.keystore"), keyStoreFile);
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ws/serviceref/TestService.wsdl:            <soap:address location='http://${node0:localhost}:8080/ws-serviceref-example/EndpointService/EJB3Bean'/>

testsuite/integration/iiop/src/test/java/org/jboss/as/test/iiop/basic/BasicIIOPInvocationTestCase.java:         *       @EJB(lookup = "corbaname:iiop:localhost:3628#IIOPTransactionalStatelessBean")
testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/webservices/SimpleStatelessSessionBean.java:    @WebServiceRef(wsdlLocation="http://localhost:8080/ws-example?wsdl", value=EndpointService.class)
testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/webservices/SimpleStatelessSessionBean.java:    @WebServiceRef(wsdlLocation="http://localhost:8080/ws-example?wsdl", value=EndpointService.class)

testsuite/integration/src/test/xslt/addRemoteOutboundConnection.xsl:    <xsl:param name="node" select="'localhost'"/>


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Hardcoded localhost - leftovers

Alessio Soldano

> testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/webservices/SimpleStatelessSessionBean.java:    @WebServiceRef(wsdlLocation="http://localhost:8080/ws-example?wsdl", value=EndpointService.class)
> testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/webservices/SimpleStatelessSessionBean.java:    @WebServiceRef(wsdlLocation="http://localhost:8080/ws-example?wsdl", value=EndpointService.class)

I don't have any real good suggestion here besides contributing the
wsdlLocation from a deployment descriptor, but frankly that's changing
the test a bit...

Cheers
Alessio

--
Alessio Soldano
Web Service Lead, JBoss
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev