[jbosscache-commits] JBoss Cache SVN: r7306 - core/trunk/src/test/java/org/jboss/cache/passivation.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri Dec 12 03:50:24 EST 2008


Author: mircea.markus
Date: 2008-12-12 03:50:23 -0500 (Fri, 12 Dec 2008)
New Revision: 7306

Modified:
   core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java
   core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java
   core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
   core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
   core/trunk/src/test/java/org/jboss/cache/passivation/PassivationToJDBCCacheLoaderTest.java
Log:
removed System.out.print

Modified: core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java	2008-12-12 08:49:20 UTC (rev 7305)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java	2008-12-12 08:50:23 UTC (rev 7306)
@@ -46,7 +46,6 @@
    {
       initCaches();
       wakeupIntervalMillis = cache.getConfiguration().getEvictionConfig().getWakeupInterval();
-      log("wakeupInterval is " + wakeupIntervalMillis);
       if (wakeupIntervalMillis < 0)
       {
          fail("testEviction(): eviction thread wake up interval is illegal " + wakeupIntervalMillis);
@@ -81,9 +80,7 @@
 
       cache.put(FQNSTR, FQNSTR, FQNSTR);
 
-      System.out.println(cache.toString());
       TestingUtil.sleepThread(2100);
-      System.out.println(cache.toString());
 
       assert !(cache.exists(FQNSTR) && cache.getNode(FQNSTR).getKeys().contains(FQNSTR)) : "Should have been evicted!!";
       Object val = cache.get(FQNSTR, FQNSTR);
@@ -113,11 +110,6 @@
 
    }
 
-   private void log(String msg)
-   {
-      System.out.println("-- " + msg);
-   }
-
    @CacheListener
    public class TestCacheListener
    {
@@ -130,7 +122,6 @@
          if (!ne.getFqn().isChildOrEquals(Fqn.fromString(FQNSTR)))
             return;// don't care about fqn that doesn't belong to me.
 
-         log("got event " + ne);
          if (ne.getType() == Event.Type.NODE_ACTIVATED)
             activationCount++;
          else if (ne.getType() == Event.Type.NODE_PASSIVATED)

Modified: core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java	2008-12-12 08:49:20 UTC (rev 7305)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java	2008-12-12 08:50:23 UTC (rev 7306)
@@ -75,8 +75,6 @@
       // Loop for long enough to have 5 runs of the eviction thread
       long loopDone = System.currentTimeMillis() + (5 * wakeupIntervalMillis);
 
-      System.out.println("Initialised; Loop for " + (5 * wakeupIntervalMillis) + " millis");
-
       while (System.currentTimeMillis() < loopDone)
       {
          // If any get returns null, that's a failure

Modified: core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java	2008-12-12 08:49:20 UTC (rev 7305)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java	2008-12-12 08:50:23 UTC (rev 7306)
@@ -57,7 +57,6 @@
       listener_.resetCounter();
 
       wakeupIntervalMillis = cache.getConfiguration().getEvictionConfig().getWakeupInterval();
-      log("wakeupInterval is " + wakeupIntervalMillis);
       if (wakeupIntervalMillis <= 0)
       {
          fail("testEviction(): eviction thread wake up interval is illegal " + wakeupIntervalMillis);
@@ -90,11 +89,6 @@
       assertEquals("Eviction counter ", 1, listener_.getCounter());
    }
 
-   private void log(String msg)
-   {
-      System.out.println("-- " + msg);
-   }
-
    @CacheListener
    public class PassivationListener
    {
@@ -118,17 +112,12 @@
          if (!ne.isPre())
          {
             counter++;
-            System.out.println("nodeActivate(): counter: " + counter);
          }
       }
 
       @NodePassivated
       public void nodePassivated(NodeEvent ne)
       {
-         if (ne.isPre())
-         {
-            System.out.println("nodePassivate(): " + ne.getFqn());
-         }
       }
 
       @NodeLoaded

Modified: core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java	2008-12-12 08:49:20 UTC (rev 7305)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/PassivationTestsBase.java	2008-12-12 08:50:23 UTC (rev 7306)
@@ -191,7 +191,6 @@
          cache.put("/1/2/3/4/5/d/two", null);
          cache.put("/1/2/3/4/5/d/three", null);
          // cache.put("/a/b/c", "newKey", "newValue");
-         System.out.println("cache: " + cache);
 
          assert (exists("/1/2/3/4"));
          assert (exists("/a/b/c"));
@@ -209,7 +208,6 @@
       cache.removeNode(Fqn.ROOT);// remove nothing
       cache.put("1/2/3/4/5/d", "key", "val");// put in memory
       cache.evict(Fqn.fromString("1/2/3/4/5/d"));// passivate node
-      System.out.println("-- checking for 1/2/3/4/5/d");
       addDelay();
       try
       {
@@ -222,7 +220,6 @@
       cache.getNode("1/2/3/4/5/d");// get from loader but doesn't load attributes
       assertEquals(true, loader.exists(Fqn.fromString("1/2/3/4/5/d")));
       assert (exists("1/2/3/4/5/d"));
-      System.out.println("-- 1/2/3/4/5/d exists");
       cache.get("1/2/3/4/5/d", "key");// activate node
       assertEquals(false, loader.exists(Fqn.fromString("1/2/3/4/5/d")));
    }
@@ -381,7 +378,6 @@
       assertTrue(loader.exists(Fqn.fromString("/a")));// children haven't been loaded
       Set children = cache.getNode("/a").getChildrenNames();
       assertNotNull("No children were loaded", children);
-      System.out.println("children: " + children);
       assertEquals("3 children weren't loaded", 3, children.size());
       cache.get("/a/1", "test");// activate node
       assertFalse(loader.exists(Fqn.fromString("/a/1")));
@@ -411,7 +407,6 @@
 
       Set children = cache.getNode("/a").getChildrenNames();
       assertNotNull("No children were loaded", children);
-      System.out.println("children: " + children);
       assertEquals("3 children weren't loaded", 3, children.size());
       cache.get("/a/1", "test");// activate node
       assertFalse(loader.exists(Fqn.fromString("/a/1")));
@@ -440,7 +435,6 @@
       assertFalse(loader.exists(Fqn.fromString("/a/1")));// loaded attributes and has no children
       Set children = cache.getNode("/a").getChildrenNames();// load children names
       assertNotNull("No children were loaded", children);
-      System.out.println("children: " + children);
       assertEquals("3 children weren't loaded", 3, children.size());
       assertTrue(loader.exists(Fqn.fromString("/a")));//loaded children but didn't initalizae them
    }
@@ -465,7 +459,6 @@
       assertFalse(loader.exists(Fqn.fromString("/a/3")));
       Set children = cache.getNode("/a").getChildrenNames();// get node's children names
       assertNotNull("No children were loaded", children);
-      System.out.println("children: " + children);
       assertEquals("3 children weren't loaded", 3, children.size());
       assertNull(cache.get("/a", "test"));// load attributes and has no children by now, activation
       assertFalse(loader.exists(Fqn.fromString("/a")));
@@ -484,7 +477,6 @@
       assertFalse(loader.exists(Fqn.fromString("/a/3")));
       children = cache.getNode("/a").getChildrenNames();// get children names
       assertNotNull("No children were loaded", children);
-      System.out.println("children: " + children);
       assertEquals("3 children weren't loaded", 3, children.size());
       assertNull(cache.get("/a", "test"));// load attributes and has no children by now, activation
       assertFalse(loader.exists(Fqn.fromString("/a")));
@@ -514,7 +506,6 @@
       assertFalse(loader.exists(Fqn.fromString("/a/3")));
       Set children = cache.getNode("/a").getChildrenNames();
       assertNotNull("No children were loaded", children);
-      System.out.println("children: " + children);
       assertEquals("3 children weren't loaded", 3, children.size());
 
       assertNull(cache.get("/a", "test"));// activate node

Modified: core/trunk/src/test/java/org/jboss/cache/passivation/PassivationToJDBCCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/PassivationToJDBCCacheLoaderTest.java	2008-12-12 08:49:20 UTC (rev 7305)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/PassivationToJDBCCacheLoaderTest.java	2008-12-12 08:50:23 UTC (rev 7306)
@@ -43,7 +43,6 @@
    public void shutDownDatabase()
    {
       TestDbPropertiesFactory.shutdownInMemoryDatabase(props);
-      System.out.println("Test execution took: " + (System.currentTimeMillis() - durration)/1000);
    }
 
    private Properties getJDBCProps()




More information about the jbosscache-commits mailing list