[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Testing Deployers with new Reflect + ClassPool

alesj do-not-reply at jboss.com
Tue Oct 27 12:55:47 EDT 2009


Just a simple note.
Currently we have a failing Deployers test,
due to ongoing Classpool work / fixes.


  |    public void testHierarchyCLUsage() throws Exception
  |    {
  |       AssembledDirectory directory = createBasicEar();
  |       DeploymentUnit unit = assertDeploy(directory);
  |       try
  |       {
  |          TypeInfoFactory typeInfoFactory = new JavassistTypeInfoFactory();
  |          DeploymentUnit child = getDeploymentUnit(unit, "simple.war");
  |          ClassLoader cl = getClassLoader(child);
  |          TypeInfo ti = typeInfoFactory.getTypeInfo(AnyServlet.class.getName(), cl);
  |          ClassInfo ci = assertInstanceOf(ti, ClassInfo.class);
  |          MethodInfo mi = ci.getDeclaredMethod("getBean");
  |          assertNotNull("No such 'getBean' method on " + ci, mi);
  |          TypeInfo rt = mi.getReturnType();
  |          TypeInfo cti = typeInfoFactory.getTypeInfo(PlainJavaBean.class.getName(), getClassLoader(unit));
  |          assertSame(rt, cti); // current failure!
  |       }
  |       finally
  |       {
  |          undeploy(unit);
  |       }
  |    }
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262474#4262474

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262474



More information about the jboss-dev-forums mailing list