User: d_jencks
  Date: 01/09/19 12:16:54

  Modified:    src/main/org/jboss/test JBossTestCase.java
                        JBossTestServices.java JBossTestSetup.java
  Log:
  Changed stress tests to have counts set from build.xml.  You may set values in a 
local.properties file.
  
  Revision  Changes    Path
  1.5       +18 -2     jbosstest/src/main/org/jboss/test/JBossTestCase.java
  
  Index: JBossTestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/JBossTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JBossTestCase.java        2001/09/18 22:00:42     1.4
  +++ JBossTestCase.java        2001/09/19 19:16:53     1.5
  @@ -42,7 +42,7 @@
    * ../lib).
    *
    * @author    <a href="[EMAIL PROTECTED]">David Jencks</a>
  - * @version   $Revision: 1.4 $
  + * @version   $Revision: 1.5 $
    */
   public class JBossTestCase
          extends TestCase
  @@ -51,7 +51,6 @@
      private JBossTestServices delegate;
   
   
  -
      // Static --------------------------------------------------------
      // Constructors --------------------------------------------------
      /**
  @@ -277,6 +276,23 @@
         suite.addTest(new TestSuite(clazz));
         return getJ2eeSetup(suite, jarName);
      }
  +
  +   protected int getThreadCount()
  +   {
  +      return delegate.getThreadCount();
  +   }
  +
  +   protected int getIterationCount()
  +   {
  +      return delegate.getIterationCount();
  +   }
  +
  +   protected int getBeanCount()
  +   {
  +      return delegate.getBeanCount();
  +   }
  +
  +
   
      //private methods--------------
   
  
  
  
  1.4       +23 -1     jbosstest/src/main/org/jboss/test/JBossTestServices.java
  
  Index: JBossTestServices.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/JBossTestServices.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JBossTestServices.java    2001/09/18 22:00:42     1.3
  +++ JBossTestServices.java    2001/09/19 19:16:53     1.4
  @@ -41,7 +41,7 @@
    * ../lib).
    *
    * @author    <a href="[EMAIL PROTECTED]">David Jencks</a>
  - * @version   $Revision: 1.3 $
  + * @version   $Revision: 1.4 $
    */
   public class JBossTestServices
   {
  @@ -50,6 +50,10 @@
      private final static String serviceDeployerName = 
"JBOSS-SYSTEM:service=ServiceDeployer";
      private final static String j2eeDeployerName = "J2EE:service=J2eeDeployer";
   
  +   private final static int DEFAULT_THREADCOUNT = 10;
  +   private final static int DEFAULT_ITERATIONCOUNT = 1000;
  +   private final static int DEFAULT_BEANCOUNT = 100;
  +
      // Attributes ----------------------------------------------------
      private RMIConnector server;
      private Category log;
  @@ -326,6 +330,24 @@
         Object[] params = {"other"};
         String[] signature = {"java.lang.String"};
         invoke(jaasMgr, "flushAuthenticationCache", params, signature);
  +   }
  +
  +   int getThreadCount()
  +   {
  +      log.info("jbosstest.threadcount: " + 
System.getProperty("jbosstest.threadcount"));
  +      return Integer.getInteger("jbosstest.threadcount", 
DEFAULT_THREADCOUNT).intValue();
  +   }
  +
  +   int getIterationCount()
  +   {
  +      log.info("jbosstest.iterationcount: " + 
System.getProperty("jbosstest.iterationcount"));
  +      return Integer.getInteger("jbosstest.iterationcount", 
DEFAULT_ITERATIONCOUNT).intValue();
  +   }
  +
  +   int getBeanCount()
  +   {
  +      log.info("jbosstest.beancount: " + System.getProperty("jbosstest.beancount"));
  +      return Integer.getInteger("jbosstest.beancount", 
DEFAULT_BEANCOUNT).intValue();
      }
   
   
  
  
  
  1.3       +17 -1     jbosstest/src/main/org/jboss/test/JBossTestSetup.java
  
  Index: JBossTestSetup.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/JBossTestSetup.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JBossTestSetup.java       2001/09/18 22:00:42     1.2
  +++ JBossTestSetup.java       2001/09/19 19:16:53     1.3
  @@ -44,7 +44,7 @@
    * ../lib).
    *
    * @author    <a href="[EMAIL PROTECTED]">David Jencks</a>
  - * @version   $Revision: 1.2 $
  + * @version   $Revision: 1.3 $
    */
   public class JBossTestSetup
          extends TestSetup
  @@ -246,6 +246,22 @@
      protected void flushAuthCache() throws Exception
      {
         delegate.flushAuthCache();
  +   }
  +
  +
  +   protected int getThreadCount()
  +   {
  +      return delegate.getThreadCount();
  +   }
  +
  +   protected int getIterationCount()
  +   {
  +      return delegate.getIterationCount();
  +   }
  +
  +   protected int getBeanCount()
  +   {
  +      return delegate.getBeanCount();
      }
   
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to