[jboss-cvs] JBossCache/tests/functional/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Thu Jul 20 04:05:18 EDT 2006


  User: msurtani
  Date: 06/07/20 04:05:18

  Modified:    tests/functional/org/jboss/cache  CallbackTest.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.9       +11 -10    JBossCache/tests/functional/org/jboss/cache/CallbackTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CallbackTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/CallbackTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- CallbackTest.java	18 Jul 2006 10:50:47 -0000	1.8
  +++ CallbackTest.java	20 Jul 2006 08:05:18 -0000	1.9
  @@ -5,6 +5,7 @@
   import junit.framework.TestSuite;
   import org.jboss.cache.lock.IsolationLevel;
   import org.jboss.cache.transaction.DummyTransactionManager;
  +import org.jboss.cache.config.Configuration;
   
   import javax.transaction.NotSupportedException;
   import javax.transaction.Transaction;
  @@ -12,7 +13,7 @@
   /**
    * Tests whether modifications within callbacks (TreeCacheListener) are handled correctly
    * @author Bela Ban
  - * @version $Id: CallbackTest.java,v 1.8 2006/07/18 10:50:47 msurtani Exp $
  + * @version $Id: CallbackTest.java,v 1.9 2006/07/20 08:05:18 msurtani Exp $
    */
   public class CallbackTest extends TestCase {
      TreeCache cache=null, cache2;
  @@ -48,7 +49,7 @@
   
   
      public void testLocalPutCallbackWithoutTransaction() throws Exception, NotSupportedException {
  -      cache=createCache(TreeCache.LOCAL, IsolationLevel.SERIALIZABLE);
  +      cache=createCache(Configuration.CacheMode.LOCAL, IsolationLevel.SERIALIZABLE);
         cache.addTreeCacheListener(new PutListener(cache));
   
         cache.put(FQN_A, null);
  @@ -60,7 +61,7 @@
      }
   
      public void testLocalGetCallbackSameFqnWithoutTransaction() throws Exception, NotSupportedException {
  -      cache=createCache(TreeCache.LOCAL, IsolationLevel.SERIALIZABLE);
  +      cache=createCache(Configuration.CacheMode.LOCAL, IsolationLevel.SERIALIZABLE);
         cache.addTreeCacheListener(new GetListener(cache, FQN_A));
   
         cache.put(FQN_A, null);
  @@ -71,7 +72,7 @@
      }
   
      public void testLocalGetCallbackDifferentFqnWithoutTransaction() throws Exception, NotSupportedException {
  -      cache=createCache(TreeCache.LOCAL, IsolationLevel.SERIALIZABLE);
  +      cache=createCache(Configuration.CacheMode.LOCAL, IsolationLevel.SERIALIZABLE);
         cache.put(FQN_B, null);
         cache.addTreeCacheListener(new GetListener(cache, FQN_B));
   
  @@ -86,7 +87,7 @@
   
   
      public void testLocalCallbackWithTransaction() throws Exception, NotSupportedException {
  -      cache=createCache(TreeCache.LOCAL, IsolationLevel.SERIALIZABLE);
  +      cache=createCache(Configuration.CacheMode.LOCAL, IsolationLevel.SERIALIZABLE);
         cache.addTreeCacheListener(new PutListener(cache));
         tx=startTransaction();
         cache.put(FQN_A, null);
  @@ -97,7 +98,7 @@
   
   
      public void testLocalCallbackWithException() throws Exception, NotSupportedException {
  -      cache=createCache(TreeCache.LOCAL, IsolationLevel.SERIALIZABLE);
  +      cache=createCache(Configuration.CacheMode.LOCAL, IsolationLevel.SERIALIZABLE);
         cache.addTreeCacheListener(new ExceptionListener());
         tx=startTransaction();
         try {
  @@ -162,11 +163,11 @@
      }*/
   
   
  -   TreeCache createCache(int mode, IsolationLevel level) throws Exception {
  +   TreeCache createCache(Configuration.CacheMode mode, IsolationLevel level) throws Exception {
         TreeCache c=new TreeCache();
  -      c.setCacheMode(mode);
  -      c.setIsolationLevel(level);
  -      c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      c.getConfiguration().setCacheModeInt(mode);
  +      c.getConfiguration().setIsolationLevel(level);
  +      c.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         c.createService();
         c.startService();
         return c;
  
  
  



More information about the jboss-cvs-commits mailing list