[jboss-cvs] JBossAS SVN: r80645 - projects/cluster/hibernate-jbc-cacheprovider/trunk/src/test/java/org/jboss/hibernate/jbc/cacheprovider/functional.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 7 07:35:48 EST 2008


Author: galder.zamarreno at jboss.com
Date: 2008-11-07 07:35:48 -0500 (Fri, 07 Nov 2008)
New Revision: 80645

Added:
   projects/cluster/hibernate-jbc-cacheprovider/trunk/src/test/java/org/jboss/hibernate/jbc/cacheprovider/functional/PessimisticStandaloneJBossCacheTestCase.java
Log:
[JBCLUSTER-215] Added standalone tree cache provider test case.

Added: projects/cluster/hibernate-jbc-cacheprovider/trunk/src/test/java/org/jboss/hibernate/jbc/cacheprovider/functional/PessimisticStandaloneJBossCacheTestCase.java
===================================================================
--- projects/cluster/hibernate-jbc-cacheprovider/trunk/src/test/java/org/jboss/hibernate/jbc/cacheprovider/functional/PessimisticStandaloneJBossCacheTestCase.java	                        (rev 0)
+++ projects/cluster/hibernate-jbc-cacheprovider/trunk/src/test/java/org/jboss/hibernate/jbc/cacheprovider/functional/PessimisticStandaloneJBossCacheTestCase.java	2008-11-07 12:35:48 UTC (rev 80645)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.hibernate.jbc.cacheprovider.functional;
+
+import junit.framework.Test;
+
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.jboss.cache.TreeCache;
+
+/**
+ * PessimisticStandaloneJBossCacheTestCase to test behaivour of standalone 
+ * (non-JMX and non-JNDI) tree cache provider: 
+ * 
+ * org.jboss.hibernate.jbc.cacheprovider.TreeCacheProvider
+ * 
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
+ */
+public class PessimisticStandaloneJBossCacheTestCase extends AbstractQueryCacheFunctionalTestCase
+{
+   public static final String JBC_CONFIG = "org/jboss/hibernate/jbc/cacheprovider/functional/pessimistic-treecache.xml";
+   
+   public static final String JBC_CACHE_PROVIDER = "org.jboss.hibernate.jbc.cacheprovider.TreeCacheProvider";
+
+   public PessimisticStandaloneJBossCacheTestCase(String x)
+   {
+      super(x, TreeCache.LOCAL);
+   }
+
+   public static Test suite() 
+   {
+      return new FunctionalTestClassTestSuite(PessimisticStandaloneJBossCacheTestCase.class);
+   }
+   
+   /**
+    * Apply any region-factory specific configurations.
+    * 
+    * @param the Configuration to update.
+    */
+   protected void configureCacheFactory(Configuration cfg) 
+   {
+      // No need to call super.configureCacheFactory() because that call sets
+      // the MBean name which we explicitly don't want to be testing with this 
+      // cache provider.
+      
+      cfg.setProperty(Environment.CACHE_PROVIDER_CONFIG, JBC_CONFIG);
+      cfg.setProperty(Environment.CACHE_PROVIDER, JBC_CACHE_PROVIDER);
+   }
+}




More information about the jboss-cvs-commits mailing list