[jboss-cvs] JBossAS SVN: r112117 - in branches/JBPAPP_5_1/testsuite: src/main/org/jboss/test/iiop/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 24 11:50:09 EDT 2011
Author: klape
Date: 2011-08-24 11:50:08 -0400 (Wed, 24 Aug 2011)
New Revision: 112117
Modified:
branches/JBPAPP_5_1/testsuite/imports/config/tests-jbpapp6469.xml
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/iiop/test/Jbpapp6469TestCase.java
Log:
[JBPAPP-6469] Fixing build issues, cleaning up code
Modified: branches/JBPAPP_5_1/testsuite/imports/config/tests-jbpapp6469.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/imports/config/tests-jbpapp6469.xml 2011-08-24 13:35:10 UTC (rev 112116)
+++ branches/JBPAPP_5_1/testsuite/imports/config/tests-jbpapp6469.xml 2011-08-24 15:50:08 UTC (rev 112117)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- | Targets that run the jbpapp6469 - CheckSubDeploymentCompleteDeployer tests
+ | Targets that run the jbpapp6469
-->
<project xmlns:server="http://jboss.org/ns/test/ant/server" name="jbpapp6469.tests">
<patternset id="jbpapp6469.includes">
@@ -13,7 +13,7 @@
</patternset>
</create-config>
<!-- set jmx user/pass to admin=admin -->
- <copy file="${source.resources}/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties" overwrite="true" todir="${jboss.dist}/server/jbpapp6517/conf/props/"/>
+ <copy file="${source.resources}/org/jboss/test/deployment/jbpapp6517/jmx-console-users.properties" overwrite="true" todir="${jboss.dist}/server/jbpapp6469/conf/props/"/>
<!-- default case -->
<server:start name="jbpapp6469"/>
<run-junit junit.patternset="jbpapp6469.includes" junit.configuration="jbpapp6469"/>
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/iiop/test/Jbpapp6469TestCase.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/iiop/test/Jbpapp6469TestCase.java 2011-08-24 13:35:10 UTC (rev 112116)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/iiop/test/Jbpapp6469TestCase.java 2011-08-24 15:50:08 UTC (rev 112117)
@@ -45,13 +45,15 @@
public Jbpapp6469TestCase(String name)
{
super(name);
+ SecurityAssociation.setPrincipal(new SimplePrincipal("admin"));
+ SecurityAssociation.setCredential("admin");
}
public void testIiopWorksOnStandard() throws Exception
{
try
{
- deployFailOnError("file:///home/klape/jboss/src/JBPAPP_5_1/testsuite/output/lib/jbpapp6469.jar");
+ deployFailOnError("jbpapp6469.jar");
String objectNameString = "jboss:service=CorbaNaming";
MBeanServerConnection mbeanServerConnection = getRMIServer(null);
ObjectName objectName = new ObjectName(objectNameString);
@@ -67,31 +69,17 @@
}
finally
{
- undeployFailOnError("file:///home/klape/jboss/src/JBPAPP_5_1/testsuite/output/lib/jbpapp6469.jar");
+ undeployFailOnError("jbpapp6469.jar");
}
}
private static MBeanServerConnection getRMIServer(String host) throws Exception
{
String connectorName = "jmx/rmi/RMIAdaptor";
- RMIAdaptor server = (RMIAdaptor) getInitialContext(host).lookup(connectorName);
+ RMIAdaptor server = (RMIAdaptor) new InitialContext().lookup(connectorName);
return server;
}
- private static InitialContext getInitialContext(String host) throws Exception
- {
- if ( host == null )
- return new InitialContext();
- else
- {
- Properties props = new Properties();
- props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
- props.put(Context.PROVIDER_URL, "jnp://"+host+":1099");
- return new InitialContext(props);
- }
- }
-
private void deployFailOnError(String file)
{
try
@@ -119,4 +107,3 @@
}
}
}
-// vim: sw=3 ts=3
More information about the jboss-cvs-commits
mailing list