This content has been marked as final.
Show 2 replies
-
1. Re: AbstractDeploymentTest still using DeploymentContext
alesj Nov 9, 2007 9:56 AM (in response to alesj)OK, this DS check can be changed to this simple true/false:
boolean deployed = isDeployed(info.getName()); assertTrue("Should be fully deployed: " + shortName, deployed);
Where 'isDeployed' is this:protected boolean isDeployed(String deployment) throws Exception { URL deployURL = getDeployURL(deployment); String[] sig = { URL.class.getName() }; Object[] args = {deployURL}; return invokeMainDeployer("isDeployed", args, sig, Boolean.class); } protected <T> T invokeMainDeployer(String methodName, Object[] args, String[] sig, Class<T> clazz) throws Exception { if (clazz == null) throw new IllegalArgumentException("Null class."); MBeanServerConnection server = getServer(); Object result = server.invoke(MainDeployerMBean.OBJECT_NAME, methodName, args, sig); return clazz.cast(result); }
-
2. Re: AbstractDeploymentTest still using DeploymentContext
alesj Nov 9, 2007 9:58 AM (in response to alesj)"alesj" wrote:
And this needs changing as well:protected void assertNotDeployed(String deployment) throws Exception { DeploymentUnit result = getDeploymentUnit(deployment); assertNull("Should not be deployed " + result, result); }
Since this previously never returned null.
Perhaps it will now with the new DU change ... need to test this.
As expected, change to DU doesn't change the behavior.
e.g. NotClientDeploymentUnitTestCase gets 'deployed' w/o problems. :-(