[jboss-svn-commits] JBL Code SVN: r29931 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src/test: java/org/jboss and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Nov 3 13:22:53 EST 2009


Author: whitingjr
Date: 2009-11-03 13:22:53 -0500 (Tue, 03 Nov 2009)
New Revision: 29931

Added:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/TestReadOnly.java
Modified:
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/auction/test/basic/ProfiledStateTransitions.java
   labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-ejb3.xml
Log:
Updated testing framework to support Hibernate native Transaction API.

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/auction/test/basic/ProfiledStateTransitions.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/auction/test/basic/ProfiledStateTransitions.java	2009-11-03 18:22:21 UTC (rev 29930)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/auction/test/basic/ProfiledStateTransitions.java	2009-11-03 18:22:53 UTC (rev 29931)
@@ -1,30 +1,37 @@
- /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 
 package auction.test.basic;
 
+import java.io.File;
 import java.io.InputStream;
 import java.sql.Connection;
 
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import javax.persistence.ColumnResult;
+import javax.persistence.SqlResultSetMapping;
+
 import org.apache.log4j.Logger;
 import org.dbunit.database.DatabaseConfig;
 import org.dbunit.database.DatabaseDataSourceConnection;
@@ -32,69 +39,102 @@
 import org.dbunit.dataset.ReplacementDataSet;
 import org.dbunit.dataset.datatype.DefaultDataTypeFactory;
 import org.dbunit.dataset.xml.FlatXmlDataSet;
-import org.jboss.jbossts.performance.persistence.IntegrityConstraint;
+import org.dbunit.operation.DatabaseOperation;
+import org.hibernate.SessionFactory;
+import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
+import org.jboss.jbossts.performance.persistence.vendor.IntegrityConstraint;
 import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
+import org.testng.annotations.AfterGroups;
 import org.testng.annotations.BeforeGroups;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Parameters;
 
+import auction.test.EJB3IntegrationTest;
+
 import com.mentorgen.tools.profile.runtime.Profile;
 
-public class ProfiledStateTransitions extends PersistentStateTransitions
+ at SqlResultSetMapping(
+      name = "PriceSellerResult",
+      columns = {
+          @ColumnResult(name = "IP"),
+          @ColumnResult(name = "SID")
+
+      }
+  )
+
+public class ProfiledStateTransitions extends EJB3IntegrationTest
 {
    private static Logger logger = Logger.getLogger(ProfiledStateTransitions.class);
+   protected SessionFactory hSessionFactory;
    private IntegrityConstraint integrityConstraint;
-   
-   @BeforeGroups(groups = "integration-persistence")
-   @Parameters ({ "basedata_location", "datatype_factory", "integrity-constraint"})
-   public void prepareDataSet(String location, String factory, String constraint) throws Exception {
-      
-       // Check if subclass has prepared everything
-       prepareSettings();
-       if (location == null)
-           throw new RuntimeException(
-               "Test subclass needs to prepare a dataset location"
-           );
+   protected String SESSION_FACTORY_JNDI ;
 
-       // Load the base dataset file
-       InputStream input =
-               Thread.currentThread().getContextClassLoader()
-                       .getResourceAsStream(location);
+   @BeforeGroups(groups = "integration-warmup")
+   @Parameters(
+   {"basedata_location", "datatype_factory", "integrity-constraint"})
+   public void prepareDataSet(String location, String factory, String constraint) throws Exception
+   {
+      // Check if subclass has prepared everything
+      prepareSettings();
+      if (location == null)
+         throw new RuntimeException("Test subclass needs to prepare a dataset location");
 
-       dataSet = new ReplacementDataSet(
-                       new FlatXmlDataSet(input)
-                     );
-       dataSet.addReplacementObject("[NULL]", null);
-       
-       if (null != factory && !"".equals( factory.trim()))
-       {
-          this.datatypeFactory = (DefaultDataTypeFactory)Class.forName(factory).newInstance();           
-       }
-       
-       if (null != constraint && !"".equals(constraint.trim()))
-       {
-           this.integrityConstraint = (IntegrityConstraint)Class.forName(constraint).newInstance();
-       }
+      // Load the base dataset file
+      InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(location);
+
+      dataSet = new ReplacementDataSet(new FlatXmlDataSet(input));
+      dataSet.addReplacementObject("[NULL]", null);
+
+      if (null != factory && !"".equals(factory.trim()))
+      {
+         this.datatypeFactory = (DefaultDataTypeFactory) Class.forName(factory).newInstance();
+      }
+
+      if (null != constraint && !"".equals(constraint.trim()))
+      {
+         this.integrityConstraint = (IntegrityConstraint) Class.forName(constraint).newInstance();
+      }
+      
    }
    
-   @BeforeGroups (groups="integration-persistence")
-   public void startProfiler( ) throws Exception
+   protected SessionFactory getSessionFactory() 
    {
+      SessionFactory returnValue = null;
+      try
+      {
+         logger.trace("Attempting to lookup session factory with jndi ["+this.SESSION_FACTORY_JNDI+"]");
+         returnValue= (SessionFactory) jndi.lookup(SESSION_FACTORY_JNDI);
+      }
+      catch (NameNotFoundException nnfe)
+      {
+         logger.error(nnfe.getMessage(), nnfe);
+      }
+      catch ( NamingException ne)
+      {
+         logger.error(ne.getMessage(), ne);
+      }
+      return returnValue;
+   }
+
+   @BeforeGroups(groups = "integration-persistence", dependsOnGroups="integration-warmup")
+   public void startProfiler() throws Exception
+   {
       logger.info("Starting profiler.....");
       Profile.clear();
       Profile.start();
    }
-   
-   @AfterClass (groups="integration-persistence")
+
+   @AfterClass(groups = "integration-persistence")
    public void stopProfiling()
    {
       logger.info("Profiling stopped.");
       Profile.stop();
       Profile.shutdown();
    }
-   
-   protected IDatabaseConnection getConnection() throws Exception {
 
+   protected IDatabaseConnection getConnection() throws Exception
+   {
+
       // Get a JDBC connection from JNDI datasource
       IDatabaseConnection dbUnitCon = new DatabaseDataSourceConnection(this.jndi, JNDI_DATASOURCE);
 
@@ -108,9 +148,72 @@
       if (null != this.datatypeFactory)
       {
          DatabaseConfig config = dbUnitCon.getConfig();
-         config.setProperty  (DatabaseConfig.PROPERTY_DATATYPE_FACTORY, this.datatypeFactory);
+         config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, this.datatypeFactory);
       }
-      
+
       return dbUnitCon;
-  }
+   }
+
+   protected void prepareSettings()
+   {
+      beforeTestOperations.add(DatabaseOperation.CLEAN_INSERT);
+   }
+   
+   
+   @BeforeGroups(groups = "integration-warmup")
+   @Parameters({"session_jndi"})
+   public void prepareParameters( String jndiSessionFactory)
+      throws Exception 
+   {
+      logger.debug("Setting Hibernate SessionFactory JNDI");
+      this.SESSION_FACTORY_JNDI = jndiSessionFactory;   
+   }
+   @Override
+   @BeforeTest(groups = "integration-warmup")
+   @Parameters({"deploy_beans_xml", "scan_classpath",
+                "jndi_datasource", "jndi_name_emf", "jndi_name_usertx"})
+   public void startContainer(String deployBeansXml, String scanClasspath,
+                              String jndiDatasource, String jndiNameEMF, String jndiNameUserTx)
+           throws Exception {
+       // Set configuration options from TestNG parameters
+       JNDI_DATASOURCE = jndiDatasource;
+       JNDI_NAME_EMF = jndiNameEMF;
+       JNDI_NAME_USERTX = jndiNameUserTx;
+
+       // Boot the JBoss Microcontainer with EJB3 settings, automatically
+       // loads ejb3-interceptors-aop.xml and embedded-jboss-beans.xml
+       EJB3StandaloneBootstrap.boot(null);
+
+       // Deploy custom stateless beans (datasource, mostly)
+       EJB3StandaloneBootstrap.deployXmlResource(deployBeansXml);
+
+       // Deploy all EJBs found on classpath (slow, scans all)
+       //EJB3StandaloneBootstrap.scanClasspath();
+
+       // Deploy all EJBs found on classpath (fast, scans only build directory)
+       // This is a relative location, matching the substring end of one of java.class.path locations!
+       // Print out System.getProperty("java.class.path") to understand this...
+       EJB3StandaloneBootstrap.scanClasspath(scanClasspath.replace("/", File.separator));
+
+       // Create InitialContext from jndi.properties
+       jndi = new InitialContext();
+   }
+   @BeforeGroups(groups = "integration-warmup")
+   public void beforeTestMethod() throws Exception {
+      Profile.stop();
+       prepareSettings();
+       for (DatabaseOperation op : beforeTestOperations ) {
+           op.execute(getConnection(), dataSet);
+       }
+       Profile.start();
+   }
+
+   @AfterGroups(groups = "integration-integration")
+   public void afterTestMethod() throws Exception {
+      Profile.stop();
+       for (DatabaseOperation op : afterTestOperations ) {
+           op.execute(getConnection(), dataSet);
+       }
+       Profile.start();
+   }
 }

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/JPAExampleTests.java	2009-11-03 18:22:53 UTC (rev 29931)
@@ -0,0 +1,160 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.readonly;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Currency;
+import java.util.GregorianCalendar;
+
+import javax.persistence.EntityManager;
+
+import org.apache.log4j.Logger;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.testng.Assert;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import com.mentorgen.tools.profile.runtime.Profile;
+
+import auction.dao.ItemDAO;
+import auction.dao.UserDAO;
+import auction.dao.ejb3.GenericEJB3DAO;
+import auction.dao.ejb3.ItemDAOBean;
+import auction.dao.ejb3.UserDAOBean;
+import auction.model.Item;
+import auction.model.MonetaryAmount;
+import auction.model.User;
+import auction.test.basic.ProfiledStateTransitions;
+
+public class JPAExampleTests extends ProfiledStateTransitions
+{
+   private static final Logger logger = Logger.getLogger(JPAExampleTests.class);
+
+   @Test(groups = "integration-warmup")
+   @Parameters ({"warmup_count"})
+   public void warmUp(String count)
+   {
+      Profile.stop();
+      int co = Integer.parseInt(count);
+      for (int i = 0; i < co ; i += 1)
+      {
+         try
+         {
+            testBody();
+         }
+         catch (Exception e)
+         {
+            logger.error(e.getMessage(), e);
+         }
+      }
+      Profile.start();
+   }
+     
+   @Test(groups = "integration-persistence", dependsOnGroups="integration-warmup")
+   @Parameters ({"test_count"})
+   public void runTest(String count)
+   {
+      int co = Integer.parseInt(count);
+      for (int i = 0; i < co ; i += 1)
+      {
+         try
+         {
+            testBody();
+         }
+         catch (Exception e)
+         {
+            logger.error(e.getMessage(), e);
+         }
+      }
+   }
+   
+   
+   public void testBody() throws Exception {
+
+       // Start a unit of work (manually, no container)
+       //getUserTransaction().begin();
+      Session session = getSessionFactory().openSession();
+      Transaction transaction = null;
+      try
+      {
+         transaction = session.beginTransaction();
+          EntityManager em = getEntityManagerFactory().createEntityManager();
+   
+          // Prepare the DAOs (manually, no Seam)
+          ItemDAO itemDAO = new ItemDAOBean();
+          ((GenericEJB3DAO) itemDAO).setEntityManager(em);
+   
+          UserDAO userDAO = new UserDAOBean();
+          ((GenericEJB3DAO) userDAO).setEntityManager(em);
+   
+          // Prepare a user object
+          User user = userDAO.findById(1l, false);
+   
+          // Make a new auction item persistent
+          Calendar startDate = GregorianCalendar.getInstance();
+          Calendar endDate = GregorianCalendar.getInstance();
+          endDate.add(Calendar.DAY_OF_YEAR, 3);
+   
+          MonetaryAmount initialPrice =
+              new MonetaryAmount(new BigDecimal(123), Currency.getInstance("USD"));
+          MonetaryAmount reservePrice =
+              new MonetaryAmount(new BigDecimal(333), Currency.getInstance("USD"));
+   
+          Assert.assertNotNull(user);
+          Item newItem =
+              new Item( "Testitem", "Test Description", user,
+                        initialPrice, reservePrice,
+                        startDate.getTime(), endDate.getTime() );
+   
+          // Don't forget to take the return value, this is basically a merge()
+          newItem = itemDAO.makePersistent(newItem);
+   
+          // End the unit of work
+//          getUserTransaction().commit();
+//          em.close();
+          transaction.commit();
+   
+          // Direct SQL query for database state in auto-commit mode
+          em = getEntityManagerFactory().createEntityManager();
+          Object[] result = (Object[])
+                  em.createNativeQuery(
+                          "select INITIAL_PRICE as IP," +
+                          "       SELLER_ID as SID from ITEM where ITEM_ID = :itemId")
+                          .setParameter("itemId", newItem.getId())
+                          .getSingleResult();
+
+          // Assert correctness of state
+          Assert.assertEquals( result[0].getClass() , BigDecimal.class);
+          Assert.assertEquals(0 , ((BigDecimal)result[0]).compareTo( ((newItem.getInitialPrice().getValue()))));
+          // The SQL resultset mapping returns a BigInteger
+          Assert.assertEquals(result[1], new BigInteger("1"));
+      }
+      catch (HibernateException e) {
+         logger.error(e.getMessage(), e);
+      }
+   }
+}

Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/TestReadOnly.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/TestReadOnly.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/readonly/TestReadOnly.java	2009-11-03 18:22:53 UTC (rev 29931)
@@ -0,0 +1,145 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jbossts.performance.readonly;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Currency;
+import java.util.GregorianCalendar;
+
+import javax.persistence.EntityManager;
+
+import org.apache.log4j.Logger;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import auction.dao.ItemDAO;
+import auction.dao.UserDAO;
+import auction.dao.ejb3.GenericEJB3DAO;
+import auction.dao.ejb3.ItemDAOBean;
+import auction.dao.ejb3.UserDAOBean;
+import auction.model.Item;
+import auction.model.MonetaryAmount;
+import auction.model.User;
+import auction.test.basic.ProfiledStateTransitions;
+
+public class TestReadOnly extends ProfiledStateTransitions
+{
+   private static final Logger logger = Logger.getLogger(TestReadOnly.class);
+   @BeforeClass (groups="integration-persistence")
+   public void warmupMethod()
+   {
+      
+   }
+   @Test (groups="integration-persistence")
+   public void actualTest()
+   {
+      
+   }
+   
+   /* Test case using Hibernate API and JTA UserTransaction behind the scenes. */
+   private void testBody()
+   {
+      SessionFactory factory = getSessionFactory();
+      if (null != factory)
+      {
+         Session hSession = factory.openSession();
+         Transaction hTransaction = null;
+         try
+         {
+            hTransaction = hSession.beginTransaction();
+            
+            hTransaction.commit();
+         }
+         catch (HibernateException he) 
+         {
+            logger.error(he.getMessage(), he); 
+         }
+         catch (Exception e)
+         {
+            logger.error(e.getMessage(), e);
+         }
+         finally
+         {
+            hSession.close();
+         }
+      }
+         
+      /*
+      // Prepare the DAOs (manually, no Seam)
+      ItemDAO itemDAO = new ItemDAOBean();
+      ((GenericEJB3DAO) itemDAO).setEntityManager(em);
+
+      UserDAO userDAO = new UserDAOBean();
+      ((GenericEJB3DAO) userDAO).setEntityManager(em);
+
+      // Prepare a user object
+      User user = userDAO.findById(1l, false);
+
+      // Make a new auction item persistent
+      Calendar startDate = GregorianCalendar.getInstance();
+      Calendar endDate = GregorianCalendar.getInstance();
+      endDate.add(Calendar.DAY_OF_YEAR, 3);
+
+      MonetaryAmount initialPrice =
+          new MonetaryAmount(new BigDecimal(123), Currency.getInstance("USD"));
+      MonetaryAmount reservePrice =
+          new MonetaryAmount(new BigDecimal(333), Currency.getInstance("USD"));
+
+      Item newItem =
+          new Item( "Testitem", "Test Description", user,
+                    initialPrice, reservePrice,
+                    startDate.getTime(), endDate.getTime() );
+
+      // Don't forget to take the return value, this is basically a merge()
+      newItem = itemDAO.makePersistent(newItem);
+
+      // End the unit of work
+      getUserTransaction().commit();
+      em.close();
+
+      // Direct SQL query for database state in auto-commit mode
+      em = getEntityManagerFactory().createEntityManager();
+      Object[] result = (Object[])
+              em.createNativeQuery(
+                      "select INITIAL_PRICE as IP," +
+                      "       SELLER_ID as SID from ITEM where ITEM_ID = :itemId")
+                      .setParameter("itemId", newItem.getId())
+                      .getSingleResult();
+      em.close();
+
+
+      // Assert correctness of state
+      assert result[0].getClass() == BigDecimal.class;
+      assert 0 == ((BigDecimal)result[0]).compareTo( ((newItem.getInitialPrice().getValue())));
+      // The SQL resultset mapping returns a BigInteger
+      assert result[1].equals(new BigInteger("1"));
+      */
+   }
+   
+}

Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-ejb3.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-ejb3.xml	2009-11-03 18:22:21 UTC (rev 29930)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-ejb3.xml	2009-11-03 18:22:53 UTC (rev 29931)
@@ -31,11 +31,18 @@
 	
 	<!-- Class name for vendor specific database relaxing for bulk imports -->
 	<parameter name="integrity-constraint" value="${db-vendor-constraint-class}"/>
+	
+	<!-- JNDI name for SessionFactory -->
+	<parameter name="session_jndi" value="java:/persistence/HibernateSessionFactory"/>
+	
+	<parameter name="warmup_count" value="10"/>
+	<parameter name="test_count" value="20"/>
 
 	<test name="Integration JPA">
 		<groups>
 			<define name="profiled-integration-persistence">
             <include name="integration-persistence" />
+            <include name="integration-warmup" />
          </define>
 			
 			<run>
@@ -44,8 +51,9 @@
 		</groups>
 
 		<classes>
-			<class name="auction.test.basic.ProfiledStateTransitions" />
+			<class name="org.jboss.jbossts.performance.readonly.JPAExampleTests" />
 		</classes>
 	</test>
 
 </suite>
+



More information about the jboss-svn-commits mailing list