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

Brian Stansberry brian.stansberry at jboss.com
Thu Jul 20 12:09:20 EDT 2006


  User: bstansberry
  Date: 06/07/20 12:09:20

  Modified:    tests/interop/org/jboss/cache/interop  InteropTest.java
  Log:
  Update interop test to use XmlConfigurationParser
  
  Revision  Changes    Path
  1.5       +10 -8     JBossCache/tests/interop/org/jboss/cache/interop/InteropTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InteropTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/interop/org/jboss/cache/interop/InteropTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- InteropTest.java	18 Jul 2006 16:27:04 -0000	1.4
  +++ InteropTest.java	20 Jul 2006 16:09:20 -0000	1.5
  @@ -12,10 +12,9 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.jboss.cache.PropertyConfigurator;
   import org.jboss.cache.TreeCache;
  -import org.jboss.cache.TreeCacheMBean;
  -import org.jboss.cache.lock.TimeoutException;
  +import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.factories.XmlConfigurationParser;
   import org.jboss.cache.misc.TestingUtil;
   
   import EDU.oswego.cs.dl.util.concurrent.Latch;
  @@ -41,7 +40,7 @@
   
      public void testInterop() throws Exception
      {      
  -      TreeCacheMBean cache = createCache("driver");
  +      TreeCache cache = createCache("driver");
         
         TestingUtil.blockUntilViewReceived(cache, 2, 10000);
         
  @@ -96,14 +95,17 @@
         assertEquals("value", cache.get("/rbremove", "key"));
      }
      
  -   protected TreeCacheMBean createCache(String cacheID) throws Exception
  +   protected TreeCache createCache(String cacheID) throws Exception
      {
         if (caches.get(cacheID) != null)
         throw new IllegalStateException(cacheID + " already created");
         
  -      TreeCacheMBean tree=new TreeCache();
  -      PropertyConfigurator config=new PropertyConfigurator();
  -      config.configure(tree, configFile);
  +      TreeCache tree=new TreeCache();
  +//      PropertyConfigurator config=new PropertyConfigurator();
  +//      config.configure(tree, configFile);
  +      XmlConfigurationParser parser = new XmlConfigurationParser();
  +      Configuration c = parser.parseFile(configFile);
  +      tree.setConfiguration(c);
         
         tree.createService();
         tree.startService();
  
  
  



More information about the jboss-cvs-commits mailing list