[jboss-cvs] JBossCache/tests/perf/org/jboss/cache/loader ...

Galder Zamarreno galder.zamarreno at jboss.com
Thu Dec 14 13:52:40 EST 2006


  User: gzamarreno
  Date: 06/12/14 13:52:40

  Modified:    tests/perf/org/jboss/cache/loader 
                        JDBCCacheLoaderPerfTest.java
  Log:
  [JBCACHE-879] drop table set to false in cache-jdbc.properties. Otherwise JDBCCacheLoaderPerfTest.tesGet() won't get anything.
  cache.jdbc.table.drop added to JDBCCacheLoaderPerfTest.configureCache(). In tearDown() we evict cache not remove otherwise jdbc data is lost. results of get and remove operations are tested for not null.
  
  Revision  Changes    Path
  1.9       +5 -4      JBossCache/tests/perf/org/jboss/cache/loader/JDBCCacheLoaderPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JDBCCacheLoaderPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/loader/JDBCCacheLoaderPerfTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- JDBCCacheLoaderPerfTest.java	15 Nov 2006 23:48:32 -0000	1.8
  +++ JDBCCacheLoaderPerfTest.java	14 Dec 2006 18:52:40 -0000	1.9
  @@ -51,7 +51,7 @@
      {
         if (cache != null)
         {
  -         cache.remove("/");
  +         cache.evict(Fqn.fromString("/"));
            cache.stop();
            cache = null;
   
  @@ -80,7 +80,8 @@
                 "cache.jdbc.url=" + prop.getProperty("cache.jdbc.url") + "\n" +
                 "cache.jdbc.user=" + prop.getProperty("cache.jdbc.user") + "\n" +
                 "cache.jdbc.password=" + prop.getProperty("cache.jdbc.password") + "\n" +
  -              "cache.jdbc.node.type=" + prop.getProperty("cache.jdbc.node.type");
  +              "cache.jdbc.node.type=" + prop.getProperty("cache.jdbc.node.type") + "\n" +
  +              "cache.jdbc.table.drop=" + prop.getProperty("cache.jdbc.table.drop");
         cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.JDBCCacheLoader", props, false, true, false));
      }
   
  @@ -138,7 +139,7 @@
                     long start = System.currentTimeMillis();
                     for (int j = 0; j < NUM_TIMES_PER_THREAD; j++)
                     {
  -                     cache.get(fqn, "key" + j);
  +                     assertNotNull(cache.get(fqn, "key" + j));
                        long timeTaken = System.currentTimeMillis() - start;
                        getStat[j] = timeTaken;
                     }
  @@ -178,7 +179,7 @@
                     long start = System.currentTimeMillis();
                     for (int j = 0; j < NUM_TIMES_PER_THREAD; j++)
                     {
  -                     cache.remove(fqn, "key" + j);
  +                     assertNotNull(cache.remove(fqn, "key" + j));
                        cache.evict(fqn);
                        long timeTaken = System.currentTimeMillis() - start;
                        removeStat[j] = timeTaken;
  
  
  



More information about the jboss-cvs-commits mailing list