Author: mircea.markus
Date: 2008-12-12 03:47:58 -0500 (Fri, 12 Dec 2008)
New Revision: 7303
Modified:
core/trunk/src/test/java/org/jboss/cache/util/CachesTest.java
core/trunk/src/test/java/org/jboss/cache/util/DeltaMapTest.java
core/trunk/src/test/java/org/jboss/cache/util/TestDbPropertiesFactory.java
core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
core/trunk/src/test/java/org/jboss/cache/util/UnitTestTestNGListener.java
core/trunk/src/test/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockTest.java
core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionWatcher.java
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/OptimisticReplicationListener.java
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java
Log:
removed System.out.print
Modified: core/trunk/src/test/java/org/jboss/cache/util/CachesTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/CachesTest.java 2008-12-12 08:44:51 UTC
(rev 7302)
+++ core/trunk/src/test/java/org/jboss/cache/util/CachesTest.java 2008-12-12 08:47:58 UTC
(rev 7303)
@@ -192,7 +192,6 @@
m.put(h, 21);
assertEquals(42, m.get(f));
assertEquals(69, m.get(g));
- System.out.println(printDetails(cache));
}
private String printDetails(Cache c)
Modified: core/trunk/src/test/java/org/jboss/cache/util/DeltaMapTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/DeltaMapTest.java 2008-12-12 08:44:51
UTC (rev 7302)
+++ core/trunk/src/test/java/org/jboss/cache/util/DeltaMapTest.java 2008-12-12 08:47:58
UTC (rev 7303)
@@ -128,8 +128,6 @@
{
dm.remove(null);
dm.put(K, Y);
- System.out.println(dm.toDebugString());
- System.out.println(dm.toString());
Iterator<Entry<String, String>> i = dm.entrySet().iterator();
assertEquals(true, i.hasNext());
assertEquals(true, i.hasNext());
Modified: core/trunk/src/test/java/org/jboss/cache/util/TestDbPropertiesFactory.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/TestDbPropertiesFactory.java 2008-12-12
08:44:51 UTC (rev 7302)
+++ core/trunk/src/test/java/org/jboss/cache/util/TestDbPropertiesFactory.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -51,7 +51,6 @@
String shutDownConnection = getShutdownUrl(props);
String url = props.getProperty("cache.jdbc.url");
assert url != null;
- System.out.println("shutDownConnection = " + shutDownConnection);
conn = DriverManager.getConnection(shutDownConnection);
st = conn.createStatement();
st.execute("SHUTDOWN");
@@ -79,7 +78,6 @@
String dbName = getDatabaseName(props);
String toDel = TestingUtil.TEST_FILES + File.separator + dbName;
TestingUtil.recursiveFileRemove(toDel);
- System.out.println("Deleted file " + toDel);
}
public static String getDatabaseName(Properties prop)
@@ -99,7 +97,6 @@
//jdbc:derby:jbossdb;create=true
StringTokenizer tokenizer = new StringTokenizer(url,";");
String result = tokenizer.nextToken() + ";" + "shutdown=true";
- System.out.println("result = " + result);
return result;
}
@@ -113,7 +110,6 @@
boolean found = matcher.find();
assert found;
String newJdbcUrl = matcher.replaceFirst(extractTestName() +
userIndex.incrementAndGet());
- System.out.println("newJdbcUrl = " + newJdbcUrl);
toReturn.put("cache.jdbc.url", newJdbcUrl);
return toReturn;
}
Modified: core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java 2008-12-12 08:44:51 UTC
(rev 7302)
+++ core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java 2008-12-12 08:47:58 UTC
(rev 7303)
@@ -412,7 +412,6 @@
{
if (file.exists())
{
- System.out.println("Deleting file " + file);
recursivedelete(file);
}
}
@@ -427,7 +426,6 @@
recursivedelete(file);
}
}
- //System.out.println("File " + f.toURI() + " deleted = " +
f.delete());
f.delete();
}
@@ -480,28 +478,28 @@
{
spi.stop();
} catch (Throwable t) {
- System.out.println(Thread.currentThread().getName() + "
!!!!!!!!!!!!!!!!!!!!! WARNING - Cache instance refused to stop.");
+ System.err.println(Thread.currentThread().getName() + "
!!!!!!!!!!!!!!!!!!!!! WARNING - Cache instance refused to stop.");
t.printStackTrace();
}
try {
spi.destroy();
} catch (Throwable t) {
- System.out.println(Thread.currentThread().getName() + "
!!!!!!!!!!!!!!!!!!!!! WARNING - Cache instance refused to destroy.");
- t.printStackTrace();
+ System.err.println(Thread.currentThread().getName() + "
!!!!!!!!!!!!!!!!!!!!! WARNING - Cache instance refused to destroy.");
+ t.printStackTrace();
}
if (channel != null)
{
if (channel.isOpen()) {
- System.out.println(Thread.currentThread().getName() +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Channel still opened.");
+ System.err.println(Thread.currentThread().getName() +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Channel still opened.");
Thread.dumpStack();
channel.close();
}
if (channel.isOpen()) {
- System.out.println(Thread.currentThread().getName() +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Channel close failed.");
+ System.err.println(Thread.currentThread().getName() +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Channel close failed.");
System.exit(-1);
}
if (channel.isConnected()) {
- System.out.println(Thread.currentThread().getName() +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Channel still connected.");
+ System.err.println(Thread.currentThread().getName() +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Channel still connected.");
Thread.dumpStack();
System.exit(-1);
}
@@ -683,23 +681,12 @@
public static void dumpCacheContents(List caches)
{
- System.out.println("**** START: Cache Contents ****");
int count = 1;
for (Object o : caches)
{
CacheSPI c = (CacheSPI) o;
- if (c == null)
- {
- System.out.println(" ** Cache " + count + " is null!");
- }
- else
- {
- System.out.println(" ** Cache " + count + " is " +
c.getLocalAddress());
- System.out.println(" " + CachePrinter.printCacheDetails(c));
- }
count++;
}
- System.out.println("**** END: Cache Contents ****");
}
public static void dumpCacheContents(Cache... caches)
Modified: core/trunk/src/test/java/org/jboss/cache/util/UnitTestTestNGListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/UnitTestTestNGListener.java 2008-12-12
08:44:51 UTC (rev 7302)
+++ core/trunk/src/test/java/org/jboss/cache/util/UnitTestTestNGListener.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -29,13 +29,11 @@
private int skipped = 0;
public void onTestStart(ITestResult res) {
- System.out.println(getThreadId() + " Starting test " + getTestDesc(res));
-
+
/*
IClass testClass = threadTestClass.get();
if ((testClass != null) && (! res.getTestClass().equals(testClass))) {
- System.out.println(getThreadId() + " New test class" +
res.getTestClass() + ", was " + testClass);
// the thread has started testing a new test class
@@ -43,10 +41,10 @@
boolean cleaned = new UnitTestCacheFactory().cleanUp();
if (cleaned) {
// previous test left a cache
- System.out.println(getThreadId() +" WARNING
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
- System.out.println(getThreadId() +" A test method in " +
testClass.getName() + " did not clean all cache instances properly.");
- System.out.println(getThreadId() +" Use UnitTestCacheFactory.cleanUp()
or TestngUtil.killCaches(...) ");
- System.out.println(getThreadId() +" WARNING
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ System.err.println(getThreadId() +" WARNING
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ System.err.println(getThreadId() +" A test method in " +
testClass.getName() + " did not clean all cache instances properly.");
+ System.err.println(getThreadId() +" Use UnitTestCacheFactory.cleanUp()
or TestngUtil.killCaches(...) ");
+ System.err.println(getThreadId() +" WARNING
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
}
*/
Modified:
core/trunk/src/test/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockTest.java 2008-12-12
08:44:51 UTC (rev 7302)
+++
core/trunk/src/test/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockTest.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -348,9 +348,7 @@
{
final InvocationContextContainer icc = getInvocationContextContainer();
final OwnableReentrantLock lock = new OwnableReentrantLock(icc);
- System.out.println(lock.toString());
lock.lockInterruptibly();
- System.out.println(lock.toString());
try
{
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionWatcher.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionWatcher.java 2008-12-12
08:44:51 UTC (rev 7302)
+++
core/trunk/src/test/java/org/jboss/cache/util/internals/EvictionWatcher.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -51,8 +51,6 @@
fqnsToWaitFor.remove(ee.getFqn());
latch.countDown();
}
-
- if (ee.isPre()) System.out.println("Saw " + ee.getFqn() + " was
expecting? " + xpect);
}
/**
Modified:
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java 2008-12-12
08:44:51 UTC (rev 7302)
+++
core/trunk/src/test/java/org/jboss/cache/util/internals/ReplicationQueueNotifier.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -48,7 +48,6 @@
{
ReplicationQueue original = (ReplicationQueue)
TestingUtil.extractField(BaseRpcInterceptor.class, interceptor,
"replicationQueue");
TestingUtil.replaceField(new
ReplicationQueueDelegate(original),"replicationQueue", interceptor,
BaseRpcInterceptor.class);
- log("replaced replicationQueue in " + interceptor.getClass());
}
}
@@ -64,7 +63,6 @@
throw new RuntimeException(e);
}
}
- log("returning from waitUntillAllReplicated call");
}
private class ReplicationQueueDelegate extends ReplicationQueue
@@ -79,7 +77,6 @@
@Override
public void flush()
{
- log("Flush invoked!");
original.flush();
synchronized (replicated)
{
@@ -87,9 +84,4 @@
}
}
}
-
- private void log(String str)
- {
- System.out.println("ReplicationQueueNotifier >>> " + str);
- }
}
Modified:
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/OptimisticReplicationListener.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/OptimisticReplicationListener.java 2008-12-12
08:44:51 UTC (rev 7302)
+++
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/OptimisticReplicationListener.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -51,7 +51,6 @@
protected void postReplicateExecution(ReplicateCommand realOne)
{
- int initialExpectations = expectedCommands.size();
List<ReplicableCommand> mods = getAllModifications(realOne);
for (Iterator<Class<? extends ReplicableCommand>> typeIt =
expectedCommands.iterator(); typeIt.hasNext();)
{
@@ -67,8 +66,6 @@
}
}
}
- int remainingExpectations = expectedCommands.size();
- System.out.println("Processed command: " + realOne + ". " +
(initialExpectations - remainingExpectations) + " identified, remaining " +
remainingExpectations);
}
private List<ReplicableCommand> getAllModifications(ReplicateCommand realOne)
Modified:
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java 2008-12-12
08:44:51 UTC (rev 7302)
+++
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java 2008-12-12
08:47:58 UTC (rev 7303)
@@ -154,7 +154,6 @@
private Object process(Object result)
{
- System.out.println(localAddress + " >>>> " + result );
boolean isReplicate = result instanceof ReplicateCommand;
boolean isRemote = result != null &&
isRemoteCommand(result.getClass());
if ((isReplicate || isRemote) && (expectedCommands != null))
@@ -234,7 +233,6 @@
protected void postReplicateExecution(ReplicateCommand realOne)
{
- System.out.println("Processed command: " + realOne + "; expecting
" + expectedCommands.size() + " commands");
Iterator<Class<? extends ReplicableCommand>> it =
expectedCommands.iterator();
while (it.hasNext())
{
@@ -251,7 +249,6 @@
}
}
}
- System.out.println("After process expecing : " + expectedCommands.size()
+ " commands");
}
/**