From: Anil S. <osd...@us...> - 2004-07-09 21:19:31
|
User: osdchicago Date: 04/07/09 14:19:25 Modified: src/main/org/jboss/test/testbeancluster/test BeanUnitTestCaseNew.java Log: Test Framework for HttpSessionReplication on jboss-head Revision Changes Path 1.5 +17 -4 jbosstest/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCaseNew.java Index: BeanUnitTestCaseNew.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCaseNew.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BeanUnitTestCaseNew.java 27 Aug 2003 04:33:29 -0000 1.4 +++ BeanUnitTestCaseNew.java 9 Jul 2004 21:19:25 -0000 1.5 @@ -27,7 +27,7 @@ * Test SLSB for load-balancing behaviour * * @author <a href="mailto:sac...@co...">Sacha Labourey</a>. - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * * <p><b>Revisions:</b> * @@ -35,6 +35,9 @@ * <ul> * <li> First implementation </li> * </ul> + * <UL> + * <LI>Ani...@jb...</LI> + * </UL> */ public class BeanUnitTestCaseNew extends JBossClusteredTestCase @@ -43,6 +46,8 @@ public static int test = 0; static Date startDate = new Date(); + private String[] servernames= {"jnp://localhost:1099", "jnp://localhost:1199"}; + protected final String namingFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY); @@ -51,6 +56,14 @@ public BeanUnitTestCaseNew (String name) { super(name); + try{ + //Setting servernames gives us flexibility. + //Further flexibility can be brought by reading the servernames + //from a properties file + this.setServerNames(servernames); + }catch(Exception e){ + getLog().debug( "Passing servernames croacked"); + } } public static Test suite() throws Exception @@ -61,8 +74,8 @@ public void testStatelessBeanLoadBalancing() throws Exception - { - getLog().debug(++test+"- "+"Trying the context..."); + { + getLog().debug(++test+"- "+"Trying the context..."); Context ctx = new InitialContext(); getLog().debug("OK"); @@ -76,7 +89,7 @@ StatelessSessionHome statelessSessionHome = (StatelessSessionHome) ctx.lookup("nextgen.StatelessSession"); if (statelessSessionHome!= null ) getLog().debug("ok"); - getLog().debug(++test+"- "+"Calling create on StatelessSessionHome..."); + getLog().debug(++test+"- "+"Calling create on StatelessSessionHome..."); StatelessSession statelessSession = (StatelessSession)statelessSessionHome.create(); assertTrue("statelessSessionHome.create() != null", statelessSession != null); |