JBoss Cache SVN: r6730 - core/branches/2.2.X/src/test/java/org/jboss/cache/profiling.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-09-16 06:13:30 -0400 (Tue, 16 Sep 2008)
New Revision: 6730
Modified:
core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java
core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java
core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileTest.java
Log:
Updated test
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java
===================================================================
--- core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java 2008-09-16 10:13:14 UTC (rev 6729)
+++ core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java 2008-09-16 10:13:30 UTC (rev 6730)
@@ -4,9 +4,11 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
+import org.jboss.cache.xml.XmlHelper;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
+import org.w3c.dom.Element;
@Test(groups = "profiling")
public abstract class AbstractProfileTest
@@ -49,4 +51,63 @@
public abstract void testCacheLoading() throws Exception;
public abstract void testPassivation() throws Exception;
+
+ public Element getJGroupsConfig() throws Exception
+ {
+ String udp = "<jgroupsConfig>\n" +
+ " <UDP discard_incompatible_packets=\"true\" enable_bundling=\"true\" enable_diagnostics=\"false\" ip_ttl=\"2\"\n" +
+ " loopback=\"false\" max_bundle_size=\"64000\" max_bundle_timeout=\"30\" mcast_addr=\"228.10.10.10\"\n" +
+ " mcast_port=\"45588\" mcast_recv_buf_size=\"100000000\" mcast_send_buf_size=\"640000\"\n" +
+ " oob_thread_pool.enabled=\"true\" oob_thread_pool.keep_alive_time=\"10000\" oob_thread_pool.max_threads=\"20\"\n" +
+ " oob_thread_pool.min_threads=\"8\" oob_thread_pool.queue_enabled=\"false\" oob_thread_pool.queue_max_size=\"10\"\n" +
+ " oob_thread_pool.rejection_policy=\"Run\" thread_naming_pattern=\"pl\" thread_pool.enabled=\"true\"\n" +
+ " thread_pool.keep_alive_time=\"10000\" thread_pool.max_threads=\"30\" thread_pool.min_threads=\"8\"\n" +
+ " thread_pool.queue_enabled=\"false\" thread_pool.queue_max_size=\"10\" thread_pool.rejection_policy=\"Run\"\n" +
+ " tos=\"8\" ucast_recv_buf_size=\"20000000\" ucast_send_buf_size=\"640000\" use_concurrent_stack=\"true\"\n" +
+ " use_incoming_packet_handler=\"true\"/>\n" +
+ " <PING num_initial_members=\"3\" timeout=\"2000\"/>\n" +
+ " <MERGE2 max_interval=\"30000\" min_interval=\"10000\"/>\n" +
+ " <FD_SOCK/>\n" +
+ " <FD max_tries=\"5\" shun=\"true\" timeout=\"10000\"/>\n" +
+ " <VERIFY_SUSPECT timeout=\"1500\"/>\n" +
+ " <pbcast.NAKACK discard_delivered_msgs=\"true\" gc_lag=\"0\" retransmit_timeout=\"300,600,1200,2400,4800\"\n" +
+ " use_mcast_xmit=\"false\"/>\n" +
+ " <UNICAST timeout=\"300,600,1200,2400,3600\"/>\n" +
+ " <pbcast.STABLE desired_avg_gossip=\"50000\" max_bytes=\"400000\" stability_delay=\"1000\"/>\n" +
+ " <pbcast.GMS join_timeout=\"5000\" print_local_addr=\"true\" shun=\"false\" view_ack_collection_timeout=\"5000\"\n" +
+ " view_bundling=\"true\"/>\n" +
+ " <FC max_credits=\"500000\" min_threshold=\"0.2\"/>\n" +
+ " <FRAG2 frag_size=\"60000\"/>\n" +
+ " <pbcast.STREAMING_STATE_TRANSFER use_reading_thread=\"true\"/>\n" +
+ " <pbcast.FLUSH timeout=\"0\"/>\n" +
+ " </jgroupsConfig>";
+
+ String tcp = " <jgroupsConfig>\n" +
+ " <TCP discard_incompatible_packets=\"true\" enable_bundling=\"true\" enable_diagnostics=\"true\"\n" +
+ " enable_unicast_bundling=\"true\" loopback=\"false\" max_bundle_size=\"64000\" max_bundle_timeout=\"30\"\n" +
+ " oob_thread_pool.enabled=\"true\" oob_thread_pool.keep_alive_time=\"10000\" oob_thread_pool.max_threads=\"4\"\n" +
+ " oob_thread_pool.min_threads=\"2\" oob_thread_pool.queue_enabled=\"false\" oob_thread_pool.queue_max_size=\"10\"\n" +
+ " oob_thread_pool.rejection_policy=\"Run\" recv_buf_size=\"20000000\" thread_naming_pattern=\"pl\"\n" +
+ " thread_pool.enabled=\"true\" thread_pool.keep_alive_time=\"30000\" thread_pool.max_threads=\"4\"\n" +
+ " thread_pool.min_threads=\"1\" thread_pool.queue_enabled=\"true\" thread_pool.queue_max_size=\"50000\"\n" +
+ " thread_pool.rejection_policy=\"discard\" use_concurrent_stack=\"true\" use_incoming_packet_handler=\"true\"\n" +
+ " use_send_queues=\"false\" />\n" +
+ " <MPING mcast_addr=\"228.10.10.10\" num_initial_members=\"1\" timeout=\"2000\"/>\n" +
+ " <MERGE2 max_interval=\"30000\" min_interval=\"10000\"/>\n" +
+ " <FD_SOCK/>\n" +
+ " <FD max_tries=\"5\" shun=\"true\" timeout=\"10000\"/>\n" +
+ " <VERIFY_SUSPECT timeout=\"1500\"/>\n" +
+ " <pbcast.NAKACK discard_delivered_msgs=\"true\" gc_lag=\"0\" retransmit_timeout=\"300,600,1200,2400,4800\"\n" +
+ " use_mcast_xmit=\"false\"/>\n" +
+ " <pbcast.STABLE desired_avg_gossip=\"50000\" max_bytes=\"400000\" stability_delay=\"1000\"/>\n" +
+ " <pbcast.GMS join_timeout=\"5000\" print_local_addr=\"true\" shun=\"false\"\n" +
+ " view_ack_collection_timeout=\"5000\" view_bundling=\"true\"/>\n" +
+ " <FC max_credits=\"5000000\" min_threshold=\"0.20\"/>\n" +
+ " <FRAG2 frag_size=\"60000\"/>\n" +
+ " <pbcast.STREAMING_STATE_TRANSFER/>\n" +
+ " <pbcast.FLUSH timeout=\"0\"/>\n" +
+ " </jgroupsConfig>";
+
+ return XmlHelper.stringToElement(udp);
+ }
}
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java
===================================================================
--- core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java 2008-09-16 10:13:14 UTC (rev 6729)
+++ core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java 2008-09-16 10:13:30 UTC (rev 6730)
@@ -21,19 +21,26 @@
System.in.read();
}
+ @Test(enabled = false)
public void testReplSync() throws Exception
{
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
+ cache.getConfiguration().setExposeManagementStatistics(true);
cache.start();
waitForTest();
}
+ @Test(enabled = true)
public void testReplAsync() throws Exception
{
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
+ cache.getConfiguration().setClusterConfig(getJGroupsConfig());
cache.start();
waitForTest();
}
+ @Test(enabled = false)
public void testReplSyncOptimistic() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
@@ -42,6 +49,7 @@
waitForTest();
}
+ @Test(enabled = false)
public void testReplAsyncOptimistic() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
@@ -51,6 +59,7 @@
waitForTest();
}
+ @Test(enabled = false)
public void testReplSyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -59,14 +68,17 @@
testReplSync();
}
+ @Test(enabled = false)
public void testReplAsyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
brc.setEnabled(true);
cache.getConfiguration().setBuddyReplicationConfig(brc);
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
testReplAsync();
}
+ @Test(enabled = false)
public void testReplSyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -75,6 +87,7 @@
testReplSyncOptimistic();
}
+ @Test(enabled = false)
public void testReplAsyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -83,27 +96,27 @@
testReplAsyncOptimistic();
}
+ @Test(enabled = false)
public void testStateTransfer() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testStartup() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testCacheLoading() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testPassivation() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
}
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileTest.java
===================================================================
--- core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-09-16 10:13:14 UTC (rev 6729)
+++ core/branches/2.2.X/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-09-16 10:13:30 UTC (rev 6730)
@@ -3,10 +3,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.Fqn;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
+import org.jboss.cache.util.TestingUtil;
import org.testng.annotations.Test;
import java.util.ArrayList;
@@ -36,24 +37,29 @@
/*
Test configuration options
*/
- protected static final long DURATION = 5 * 60 * 1000; // 15 mins
+ protected static final long NUM_OPERATIONS = 500000; // DURATION is replaced with a fixed number of operations instead.
protected static final int NUM_THREADS = 15;
- protected static final int MAX_RANDOM_SLEEP_MILLIS = 25;
+ protected static final int MAX_RANDOM_SLEEP_MILLIS = 1;
protected static final int MAX_DEPTH = 3;
protected static final int MAX_OVERALL_NODES = 200;
protected static final int WARMUP_LOOPS = 20000;
+ protected static final boolean USE_SLEEP = false; // throttle generation a bit
private List<Fqn> fqns = new ArrayList<Fqn>(MAX_OVERALL_NODES);
private Random r = new Random();
private Log log = LogFactory.getLog(ProfileTest.class);
+ @Test(enabled = false)
public void testLocalModePess() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
+ cache.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
runCompleteTest();
}
+ @Test(enabled = false)
public void testLocalModeOpt() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
@@ -61,17 +67,23 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplSync() throws Exception
{
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
runCompleteTest();
}
+ @Test(enabled = true)
public void testReplAsync() throws Exception
{
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
+ cache.getConfiguration().setClusterConfig(getJGroupsConfig());
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplSyncOptimistic() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
@@ -79,6 +91,7 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplAsyncOptimistic() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
@@ -87,6 +100,7 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplSyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -95,14 +109,17 @@
testReplSync();
}
+ @Test(enabled = false)
public void testReplAsyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
brc.setEnabled(true);
cache.getConfiguration().setBuddyReplicationConfig(brc);
+ cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
testReplAsync();
}
+ @Test(enabled = false)
public void testReplSyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -111,6 +128,7 @@
testReplSyncOptimistic();
}
+ @Test(enabled = false)
public void testReplAsyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -214,40 +232,43 @@
long duration = System.currentTimeMillis() - startTime;
log.warn("Finished warmup. " + printDuration(duration));
- cache.removeNode(Fqn.ROOT);
+ //cache.removeNode(Fqn.ROOT);
+ cache.stop();
+ cache.start();
}
private void doTest() throws Exception
{
ExecutorService exec = Executors.newFixedThreadPool(NUM_THREADS);
- long end = System.currentTimeMillis() + DURATION;
long startTime = System.currentTimeMillis();
log.warn("Starting test");
- int i = 0;
- while (System.currentTimeMillis() < end)
+ int i;
+ for (i = 0; i < NUM_OPERATIONS; i++)
{
MyRunnable r = null;
switch (i % 3)
{
case 0:
- r = new Putter(i++);
+ r = new Putter(i);
break;
case 1:
- r = new Getter(i++);
+ r = new Getter(i);
break;
case 2:
- r = new Remover(i++);
+ r = new Remover(i);
break;
}
exec.execute(r);
- TestingUtil.sleepRandom(MAX_RANDOM_SLEEP_MILLIS);
+// if (USE_SLEEP) TestingUtil.sleepRandom(MAX_RANDOM_SLEEP_MILLIS);
+ if (USE_SLEEP) TestingUtil.sleepThread(MAX_RANDOM_SLEEP_MILLIS);
}
log.warn("Finished generating runnables; awaiting executor completion");
// wait for executors to complete!
exec.shutdown();
- exec.awaitTermination(((long) i) * 250, TimeUnit.MILLISECONDS); // wait up to 250 millis for each call?
+ exec.awaitTermination(((long) i), TimeUnit.SECONDS); // wait up to 1 sec for each call?
long duration = System.currentTimeMillis() - startTime;
log.warn("Finished test. " + printDuration(duration));
+ log.warn("Throughput: " + (NUM_OPERATIONS * 1000 / duration) + " operations per second (roughly equal numbers of PUT, GET and REMOVE)");
}
enum Mode
@@ -332,27 +353,27 @@
}
}
+ @Test(enabled = false)
public void testStateTransfer() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testStartup() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testCacheLoading() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testPassivation() throws Exception
{
- // TODO implement me
throw new Exception("Implement me");
}
}
17 years, 1 month
JBoss Cache SVN: r6729 - core/branches/2.2.X/src/main/java/org/jboss/cache/marshall.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-09-16 06:13:14 -0400 (Tue, 16 Sep 2008)
New Revision: 6729
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
Log:
Updated to make it JGroups 2.6.4-friendly
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-09-15 16:13:06 UTC (rev 6728)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-09-16 10:13:14 UTC (rev 6729)
@@ -85,7 +85,7 @@
byte[] buf;
try
{
- buf = req_marshaller.objectToByteBuffer(command);
+ buf = getRequestMarshaller().objectToByteBuffer(command);
}
catch (Exception e)
{
@@ -131,7 +131,7 @@
{
try
{
- return executeCommand((ReplicableCommand) req_marshaller.objectFromByteBuffer(req.getBuffer()), req);
+ return executeCommand((ReplicableCommand) getRequestMarshaller().objectFromByteBuffer(req.getBuffer()), req);
}
catch (Throwable x)
{
@@ -178,6 +178,6 @@
@Override
public String toString()
{
- return getClass().getSimpleName() + "[Outgoing marshaller: " + req_marshaller + "; incoming marshaller: " + rsp_marshaller + "]";
+ return getClass().getSimpleName() + "[Outgoing marshaller: " + getRequestMarshaller() + "; incoming marshaller: " + getResponseMarshaller() + "]";
}
}
17 years, 1 month
JBoss Cache SVN: r6728 - core/trunk/src/test/java/org/jboss/cache/profiling.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-09-15 12:13:06 -0400 (Mon, 15 Sep 2008)
New Revision: 6728
Modified:
core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java
core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java
Log:
Updated tests
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java 2008-09-15 15:56:56 UTC (rev 6727)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java 2008-09-15 16:13:06 UTC (rev 6728)
@@ -22,6 +22,7 @@
System.in.read();
}
+ @Test(enabled = false)
public void testReplSync() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
@@ -30,6 +31,7 @@
waitForTest();
}
+ @Test(enabled = true)
public void testReplAsync() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
@@ -42,6 +44,7 @@
waitForTest();
}
+ @Test(enabled = false)
public void testReplSyncOptimistic() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
@@ -50,6 +53,7 @@
waitForTest();
}
+ @Test(enabled = false)
public void testReplAsyncOptimistic() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
@@ -59,6 +63,7 @@
waitForTest();
}
+ @Test(enabled = false)
public void testReplSyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -67,6 +72,7 @@
testReplSync();
}
+ @Test(enabled = false)
public void testReplAsyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -79,6 +85,7 @@
testReplAsync();
}
+ @Test(enabled = false)
public void testReplSyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -87,6 +94,7 @@
testReplSyncOptimistic();
}
+ @Test(enabled = false)
public void testReplAsyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -95,21 +103,25 @@
testReplAsyncOptimistic();
}
+ @Test(enabled = false)
public void testStateTransfer() throws Exception
{
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testStartup() throws Exception
{
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testCacheLoading() throws Exception
{
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testPassivation() throws Exception
{
throw new Exception("Implement me");
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-09-15 15:56:56 UTC (rev 6727)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-09-15 16:13:06 UTC (rev 6728)
@@ -37,7 +37,7 @@
/*
Test configuration options
*/
- protected static final long DURATION = 60 * 1000; // 1 min of GENERATION = a lot of processing. :-)
+ protected static final long NUM_OPERATIONS = 1000000; // DURATION is replaced with a fixed number of operations instead.
protected static final int NUM_THREADS = 15;
protected static final int MAX_RANDOM_SLEEP_MILLIS = 1;
protected static final int MAX_DEPTH = 3;
@@ -50,6 +50,7 @@
private Log log = LogFactory.getLog(ProfileTest.class);
+ @Test(enabled = false)
public void testLocalModePess() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
@@ -60,6 +61,7 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testLocalModeOpt() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
@@ -67,12 +69,14 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplSync() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
runCompleteTest();
}
+ @Test(enabled = true)
public void testReplAsync() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
@@ -84,6 +88,7 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplSyncOptimistic() throws Exception
{
cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.OPTIMISTIC);
@@ -91,6 +96,7 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplAsyncOptimistic() throws Exception
{
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
@@ -99,6 +105,7 @@
runCompleteTest();
}
+ @Test(enabled = false)
public void testReplSyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -107,6 +114,7 @@
testReplSync();
}
+ @Test(enabled = false)
public void testReplAsyncBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -119,6 +127,7 @@
testReplAsync();
}
+ @Test(enabled = false)
public void testReplSyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -127,6 +136,7 @@
testReplSyncOptimistic();
}
+ @Test(enabled = false)
public void testReplAsyncOptBR() throws Exception
{
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -238,23 +248,22 @@
private void doTest() throws Exception
{
ExecutorService exec = Executors.newFixedThreadPool(NUM_THREADS);
- long end = System.currentTimeMillis() + DURATION;
long startTime = System.currentTimeMillis();
log.warn("Starting test");
- int i = 0;
- while (System.currentTimeMillis() < end)
+ int i;
+ for (i = 0; i < NUM_OPERATIONS; i++)
{
MyRunnable r = null;
switch (i % 3)
{
case 0:
- r = new Putter(i++);
+ r = new Putter(i);
break;
case 1:
- r = new Getter(i++);
+ r = new Getter(i);
break;
case 2:
- r = new Remover(i++);
+ r = new Remover(i);
break;
}
exec.execute(r);
@@ -267,6 +276,7 @@
exec.awaitTermination(((long) i), TimeUnit.SECONDS); // wait up to 1 sec for each call?
long duration = System.currentTimeMillis() - startTime;
log.warn("Finished test. " + printDuration(duration));
+ log.warn("Throughput: " + (NUM_OPERATIONS * 1000 / duration) + " operations per second (roughly equal numbers of PUT, GET and REMOVE)");
}
enum Mode
@@ -351,21 +361,25 @@
}
}
+ @Test(enabled = false)
public void testStateTransfer() throws Exception
{
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testStartup() throws Exception
{
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testCacheLoading() throws Exception
{
throw new Exception("Implement me");
}
+ @Test(enabled = false)
public void testPassivation() throws Exception
{
throw new Exception("Implement me");
17 years, 1 month
JBoss Cache SVN: r6727 - core/trunk/src/test/java/org/jboss/cache/profiling.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-09-15 11:56:56 -0400 (Mon, 15 Sep 2008)
New Revision: 6727
Modified:
core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java
Log:
Enabled bundling
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java 2008-09-15 15:01:20 UTC (rev 6726)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java 2008-09-15 15:56:56 UTC (rev 6727)
@@ -55,7 +55,7 @@
public String getJGroupsConfig() throws Exception
{
String udp = "<jgroupsConfig>\n" +
- " <UDP discard_incompatible_packets=\"true\" enable_bundling=\"false\" enable_diagnostics=\"false\" ip_ttl=\"2\"\n" +
+ " <UDP discard_incompatible_packets=\"true\" enable_bundling=\"true\" enable_diagnostics=\"false\" ip_ttl=\"2\"\n" +
" loopback=\"false\" max_bundle_size=\"64000\" max_bundle_timeout=\"30\" mcast_addr=\"228.10.10.10\"\n" +
" mcast_port=\"45588\" mcast_recv_buf_size=\"100000000\" mcast_send_buf_size=\"640000\"\n" +
" oob_thread_pool.enabled=\"true\" oob_thread_pool.keep_alive_time=\"10000\" oob_thread_pool.max_threads=\"20\"\n" +
@@ -83,7 +83,7 @@
" </jgroupsConfig>";
String tcp = " <jgroupsConfig>\n" +
- " <TCP discard_incompatible_packets=\"true\" enable_bundling=\"false\" enable_diagnostics=\"true\"\n" +
+ " <TCP discard_incompatible_packets=\"true\" enable_bundling=\"true\" enable_diagnostics=\"true\"\n" +
" enable_unicast_bundling=\"true\" loopback=\"false\" max_bundle_size=\"64000\" max_bundle_timeout=\"30\"\n" +
" oob_thread_pool.enabled=\"true\" oob_thread_pool.keep_alive_time=\"10000\" oob_thread_pool.max_threads=\"4\"\n" +
" oob_thread_pool.min_threads=\"2\" oob_thread_pool.queue_enabled=\"false\" oob_thread_pool.queue_max_size=\"10\"\n" +
17 years, 1 month
JBoss Cache SVN: r6726 - core/trunk/src/main/java/org/jboss/cache/config/parsing.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-09-15 11:01:20 -0400 (Mon, 15 Sep 2008)
New Revision: 6726
Modified:
core/trunk/src/main/java/org/jboss/cache/config/parsing/JGroupsStackParser.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
Log:
Updates
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/JGroupsStackParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/JGroupsStackParser.java 2008-09-15 15:01:12 UTC (rev 6725)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/JGroupsStackParser.java 2008-09-15 15:01:20 UTC (rev 6726)
@@ -57,13 +57,17 @@
// Ignore Namespace until JGroups defines one
Element tag = (Element) node;
String protocol = tag.getLocalName();
+ if (protocol == null)
+ {
+ protocol = tag.getNodeName(); // try a non-namespace aware version
+ }
buffer.append(protocol);
processAttributes(buffer, tag);
buffer.append(':');
}
if (buffer.length() > 0)
{
- //Remove the trailing ':'
+ //Remove the trailing ':'
buffer.setLength(buffer.length() - 1);
}
return buffer.toString();
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2008-09-15 15:01:12 UTC (rev 6725)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2008-09-15 15:01:20 UTC (rev 6726)
@@ -377,6 +377,23 @@
}
/**
+ * Converts a String representing an XML snippet into an {@link org.w3c.dom.Element}.
+ *
+ * @param xml snippet as a string
+ * @return a DOM Element
+ * @throws Exception if unable to parse the String or if it doesn't contain valid XML.
+ */
+ public static Element stringToElement(String xml) throws Exception
+ {
+ ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("utf8"));
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document d = builder.parse(bais);
+ bais.close();
+ return d.getDocumentElement();
+ }
+
+ /**
* Gets the first child element of an element
*
* @param element the parent
17 years, 1 month
JBoss Cache SVN: r6725 - core/trunk/src/test/java/org/jboss/cache/profiling.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-09-15 11:01:12 -0400 (Mon, 15 Sep 2008)
New Revision: 6725
Modified:
core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java
core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java
core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java
Log:
Updates
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java 2008-09-15 13:49:14 UTC (rev 6724)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/AbstractProfileTest.java 2008-09-15 15:01:12 UTC (rev 6725)
@@ -3,6 +3,8 @@
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.parsing.JGroupsStackParser;
+import org.jboss.cache.config.parsing.XmlConfigHelper;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
@@ -49,4 +51,63 @@
public abstract void testCacheLoading() throws Exception;
public abstract void testPassivation() throws Exception;
+
+ public String getJGroupsConfig() throws Exception
+ {
+ String udp = "<jgroupsConfig>\n" +
+ " <UDP discard_incompatible_packets=\"true\" enable_bundling=\"false\" enable_diagnostics=\"false\" ip_ttl=\"2\"\n" +
+ " loopback=\"false\" max_bundle_size=\"64000\" max_bundle_timeout=\"30\" mcast_addr=\"228.10.10.10\"\n" +
+ " mcast_port=\"45588\" mcast_recv_buf_size=\"100000000\" mcast_send_buf_size=\"640000\"\n" +
+ " oob_thread_pool.enabled=\"true\" oob_thread_pool.keep_alive_time=\"10000\" oob_thread_pool.max_threads=\"20\"\n" +
+ " oob_thread_pool.min_threads=\"8\" oob_thread_pool.queue_enabled=\"false\" oob_thread_pool.queue_max_size=\"10\"\n" +
+ " oob_thread_pool.rejection_policy=\"Run\" thread_naming_pattern=\"pl\" thread_pool.enabled=\"true\"\n" +
+ " thread_pool.keep_alive_time=\"10000\" thread_pool.max_threads=\"30\" thread_pool.min_threads=\"8\"\n" +
+ " thread_pool.queue_enabled=\"false\" thread_pool.queue_max_size=\"10\" thread_pool.rejection_policy=\"Run\"\n" +
+ " tos=\"8\" ucast_recv_buf_size=\"20000000\" ucast_send_buf_size=\"640000\" use_concurrent_stack=\"true\"\n" +
+ " use_incoming_packet_handler=\"true\"/>\n" +
+ " <PING num_initial_members=\"3\" timeout=\"2000\"/>\n" +
+ " <MERGE2 max_interval=\"30000\" min_interval=\"10000\"/>\n" +
+ " <FD_SOCK/>\n" +
+ " <FD max_tries=\"5\" shun=\"true\" timeout=\"10000\"/>\n" +
+ " <VERIFY_SUSPECT timeout=\"1500\"/>\n" +
+ " <pbcast.NAKACK discard_delivered_msgs=\"true\" gc_lag=\"0\" retransmit_timeout=\"300,600,1200,2400,4800\"\n" +
+ " use_mcast_xmit=\"false\"/>\n" +
+ " <UNICAST timeout=\"300,600,1200,2400,3600\"/>\n" +
+ " <pbcast.STABLE desired_avg_gossip=\"50000\" max_bytes=\"400000\" stability_delay=\"1000\"/>\n" +
+ " <pbcast.GMS join_timeout=\"5000\" print_local_addr=\"true\" shun=\"false\" view_ack_collection_timeout=\"5000\"\n" +
+ " view_bundling=\"true\"/>\n" +
+ " <FC max_credits=\"500000\" min_threshold=\"0.2\"/>\n" +
+ " <FRAG2 frag_size=\"60000\"/>\n" +
+ " <pbcast.STREAMING_STATE_TRANSFER use_reading_thread=\"true\"/>\n" +
+ " <pbcast.FLUSH timeout=\"0\"/>\n" +
+ " </jgroupsConfig>";
+
+ String tcp = " <jgroupsConfig>\n" +
+ " <TCP discard_incompatible_packets=\"true\" enable_bundling=\"false\" enable_diagnostics=\"true\"\n" +
+ " enable_unicast_bundling=\"true\" loopback=\"false\" max_bundle_size=\"64000\" max_bundle_timeout=\"30\"\n" +
+ " oob_thread_pool.enabled=\"true\" oob_thread_pool.keep_alive_time=\"10000\" oob_thread_pool.max_threads=\"4\"\n" +
+ " oob_thread_pool.min_threads=\"2\" oob_thread_pool.queue_enabled=\"false\" oob_thread_pool.queue_max_size=\"10\"\n" +
+ " oob_thread_pool.rejection_policy=\"Run\" recv_buf_size=\"20000000\" thread_naming_pattern=\"pl\"\n" +
+ " thread_pool.enabled=\"true\" thread_pool.keep_alive_time=\"30000\" thread_pool.max_threads=\"4\"\n" +
+ " thread_pool.min_threads=\"1\" thread_pool.queue_enabled=\"true\" thread_pool.queue_max_size=\"50000\"\n" +
+ " thread_pool.rejection_policy=\"discard\" use_concurrent_stack=\"true\" use_incoming_packet_handler=\"true\"\n" +
+ " use_send_queues=\"false\" />\n" +
+ " <MPING mcast_addr=\"228.10.10.10\" num_initial_members=\"1\" timeout=\"2000\"/>\n" +
+ " <MERGE2 max_interval=\"30000\" min_interval=\"10000\"/>\n" +
+ " <FD_SOCK/>\n" +
+ " <FD max_tries=\"5\" shun=\"true\" timeout=\"10000\"/>\n" +
+ " <VERIFY_SUSPECT timeout=\"1500\"/>\n" +
+ " <pbcast.NAKACK discard_delivered_msgs=\"true\" gc_lag=\"0\" retransmit_timeout=\"300,600,1200,2400,4800\"\n" +
+ " use_mcast_xmit=\"false\"/>\n" +
+ " <pbcast.STABLE desired_avg_gossip=\"50000\" max_bytes=\"400000\" stability_delay=\"1000\"/>\n" +
+ " <pbcast.GMS join_timeout=\"5000\" print_local_addr=\"true\" shun=\"false\"\n" +
+ " view_ack_collection_timeout=\"5000\" view_bundling=\"true\"/>\n" +
+ " <FC max_credits=\"5000000\" min_threshold=\"0.20\"/>\n" +
+ " <FRAG2 frag_size=\"60000\"/>\n" +
+ " <pbcast.STREAMING_STATE_TRANSFER/>\n" +
+ " <pbcast.FLUSH timeout=\"0\"/>\n" +
+ " </jgroupsConfig>";
+
+ return new JGroupsStackParser().parseClusterConfigXml(XmlConfigHelper.stringToElement(tcp));
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java 2008-09-15 13:49:14 UTC (rev 6724)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/ProfileSlaveTest.java 2008-09-15 15:01:12 UTC (rev 6725)
@@ -36,6 +36,7 @@
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
cache.getConfiguration().setConcurrencyLevel(500);
cache.getConfiguration().setIsolationLevel(IsolationLevel.READ_COMMITTED);
+ cache.getConfiguration().setClusterConfig(getJGroupsConfig());
// cache.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
cache.start();
waitForTest();
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-09-15 13:49:14 UTC (rev 6724)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/ProfileTest.java 2008-09-15 15:01:12 UTC (rev 6725)
@@ -79,6 +79,7 @@
cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
cache.getConfiguration().setConcurrencyLevel(500);
cache.getConfiguration().setIsolationLevel(IsolationLevel.READ_COMMITTED);
+ cache.getConfiguration().setClusterConfig(getJGroupsConfig());
// cache.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
runCompleteTest();
}
17 years, 1 month
Build failed in Hudson: jboss-cache-core-2.1.X-jdk1.5 » JBoss Cache - Core Edition #49
by jboss-qa-internal@redhat.com
See http://hudson.qa.jboss.com/hudson/job/jboss-cache-core-2.1.X-jdk1.5/org.j...
------------------------------------------
[...truncated 84088 lines...]
-- sleeping for 1000ms
-- sleeping for 1000ms
-- sleeping for 1000ms
-- val=null
-- val=/org/jboss/test/data/7
-- sleeping for 7500ms
-- val=null
-- wakeupInterval is 1000
-- Sleeping for 10000
-- wakeupInterval is 1000
-- Marking as in-use
-- wakeupInterval is 1000
org.jboss.cache.CacheImpl [14 nodes, 0 locks]
org.jboss.cache.CacheImpl [9 nodes, 0 locks]
-- wakeupInterval is 1000
-- wakeupInterval is 1000
-- period is 1000
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.02 sec
Running org.jboss.cache.multiplexer.ChannelInjectionPreferenceTest (of functional)
-------------------------------------------------------
GMS: address is 127.0.0.1:33047
-------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.188 sec
Running org.jboss.cache.transaction.IsolationLevelRepeatableReadTest (of functional)
reader thread exits
writer thread exits
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.489 sec
Running org.jboss.cache.factories.InterceptorChainFactoryTest (of functional)
testTxConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testBareConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testEvictionInterceptorConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.CacheMgmtInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheMgmtInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.OptimisticReplicationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.OptimisticReplicationInterceptor{next: class org.jboss.cache.interceptors.DataGravitatorInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.DataGravitatorInterceptor{next: class org.jboss.cache.interceptors.OptimisticLockingInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.OptimisticLockingInterceptor{next: class org.jboss.cache.interceptors.OptimisticValidatorInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.OptimisticValidatorInterceptor{next: class org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor{next: class org.jboss.cache.interceptors.OptimisticNodeInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.OptimisticNodeInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testEvictionInterceptorConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.CacheMgmtInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheMgmtInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.EvictionInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.EvictionInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testEvictionInterceptorConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.CacheMgmtInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheMgmtInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.ReplicationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.ReplicationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.DataGravitatorInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.DataGravitatorInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testTxAndRepl interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.ReplicationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.ReplicationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testUnsharedCacheLoaderConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.ReplicationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.ReplicationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.CacheLoaderInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheLoaderInterceptor{next: class org.jboss.cache.interceptors.CacheStoreInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheStoreInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testCacheMgmtConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.CacheMgmtInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheMgmtInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
testSharedCacheLoaderConfig interceptors are:
[org.jboss.cache.interceptors.InvocationContextInterceptor{next: class org.jboss.cache.interceptors.TxInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.TxInterceptor{next: class org.jboss.cache.interceptors.NotificationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.NotificationInterceptor{next: class org.jboss.cache.interceptors.ReplicationInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.ReplicationInterceptor{next: class org.jboss.cache.interceptors.PessimisticLockInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.PessimisticLockInterceptor{next: class org.jboss.cache.interceptors.CacheLoaderInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheLoaderInterceptor{next: class org.jboss.cache.interceptors.CacheStoreInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CacheStoreInterceptor{next: class org.jboss.cache.interceptors.CallInterceptor; last: class org.jboss.cache.interceptors.CallInterceptor}, org.jboss.cache.interceptors.CallInterceptor{next: null; last: class org.jboss.cache.interceptors.CallInterceptor}]
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.343 sec
Running org.jboss.cache.transaction.SuspendTxTest (of functional)
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.807 sec
Running org.jboss.cache.mgmt.PassivationTest (of functional)
count of misses 0
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Austria = null
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Austria
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Poland = null
DummyInMemoryCacheLoader debug: Did a put on /Europe/Austria, data is {population=8184691, currency=Euro, capital=VIENNA}
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Austria = {population=8184691, currency=Euro, capital=VIENNA}
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Austria
DummyInMemoryCacheLoader debug: Calling getChildrenNames on Fqn /Europe/Austria. Data map = {/Europe=Node{data={}, fqn=/Europe}, /=Node{data={}, fqn=/}, /Europe/Austria=Node{data={population=8184691, currency=Euro, capital=VIENNA}, fqn=/Europe/Austria}}
DummyInMemoryCacheLoader debug: Fqn /Europe/Austria has children []
DummyInMemoryCacheLoader debug: Removing fqn /Europe/Austria
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Austria
DummyInMemoryCacheLoader debug: Removing fqn /Europe/Austria
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Austria
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Austria = null
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Austria = null
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Poland = null
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Poland
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Poland
DummyInMemoryCacheLoader debug: Did a put on /Europe/Poland, data is {currency=Zloty, capital=Warsaw}
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Poland = {currency=Zloty, capital=Warsaw}
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Poland
DummyInMemoryCacheLoader debug: Calling getChildrenNames on Fqn /Europe/Poland. Data map = {/Europe/Poland=Node{data={currency=Zloty, capital=Warsaw}, fqn=/Europe/Poland}, /Europe=Node{data={}, fqn=/Europe}, /=Node{data={}, fqn=/}}
DummyInMemoryCacheLoader debug: Fqn /Europe/Poland has children []
DummyInMemoryCacheLoader debug: Removing fqn /Europe/Poland
DummyInMemoryCacheLoader debug: Did a put on /Europe/Poland, data is {currency=Zloty, capital=Warsaw}
DummyInMemoryCacheLoader debug: Getting data for fqn /Europe/Poland = {currency=Zloty, capital=Warsaw}
DummyInMemoryCacheLoader debug: Performing exists() on /Europe/Poland
DummyInMemoryCacheLoader debug: Calling getChildrenNames on Fqn /Europe/Poland. Data map = {/Europe/Poland=Node{data={currency=Zloty, capital=Warsaw}, fqn=/Europe/Poland}, /Europe=Node{data={}, fqn=/Europe}, /=Node{data={}, fqn=/}}
DummyInMemoryCacheLoader debug: Fqn /Europe/Poland has children []
DummyInMemoryCacheLoader debug: Removing fqn /Europe/Poland
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.578 sec
Running org.jboss.cache.CacheFactoryTest (of functional)
-------------------------------------------------------
GMS: address is 127.0.0.1:33047
-------------------------------------------------------
-------------------------------------------------------
GMS: address is 127.0.0.1:33048
-------------------------------------------------------
-------------------------------------------------------
GMS: address is 127.0.0.1:33049
-------------------------------------------------------
-------------------------------------------------------
GMS: address is 127.0.0.1:33050
-------------------------------------------------------
-------------------------------------------------------
GMS: address is 127.0.0.1:33051
-------------------------------------------------------
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.099 sec
Running org.jboss.cache.eviction.LFUPolicyTest (of functional)
-- wakeupInterval is 3000
-- sleeping for 3500ms
-- wakeupInterval is 3000
-- nodes/locks: 20/4
-- nodes/locks: 2695/1
-- nodes/locks: 5593/3
-- nodes/locks: 9767/1
-- nodes/locks: 8313/2
-- nodes/locks: 7132/1
-- nodes/locks: 3104/0
-- nodes/locks: 7881/0
-- nodes/locks: 13040/0
-- nodes/locks: 4011/2
-- nodes/locks: 8761/0
-- wakeupInterval is 3000
-- wakeupInterval is 3000
-- period is 3500
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.124 sec
Running org.jboss.cache.eviction.ElementSizeAlgorithmTest (of functional)
Fqn: /a/b/6 CreateTime: 1221410536143 NodeVisits: 7 ModifiedTime: 1221410536143 NumberOfElements: 6 CurrentlyInUse: false
Fqn: /a/b/4 CreateTime: 1221410536143 NodeVisits: 5 ModifiedTime: 1221410536143 NumberOfElements: 4 CurrentlyInUse: false
Fqn: /a/b/2 CreateTime: 1221410536143 NodeVisits: 3 ModifiedTime: 1221410536143 NumberOfElements: 2 CurrentlyInUse: false
Fqn: /a/b/0 CreateTime: 1221410536143 NodeVisits: 1 ModifiedTime: 1221410536142 NumberOfElements: 0 CurrentlyInUse: false
Fqn: /a/b/1 CreateTime: 1221410536143 NodeVisits: 1 ModifiedTime: 1221410536142 NumberOfElements: 0 CurrentlyInUse: false
Fqn: /a/b/3 CreateTime: 1221410536143 NodeVisits: 1 ModifiedTime: 1221410536142 NumberOfElements: 0 CurrentlyInUse: false
Fqn: /a/b/5 CreateTime: 1221410536143 NodeVisits: 1 ModifiedTime: 1221410536142 NumberOfElements: 0 CurrentlyInUse: false
Fqn: /a/b/7 CreateTime: 1221410536143 NodeVisits: 1 ModifiedTime: 1221410536143 NumberOfElements: 0 CurrentlyInUse: false
Fqn: /a/b/9 CreateTime: 1221410536143 NodeVisits: 1 ModifiedTime: 1221410536143 NumberOfElements: 0 CurrentlyInUse: false
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.284 sec
Running org.jboss.cache.optimistic.NodeInterceptorRemoveKeyValTest (of functional)
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1 sec
Running org.jboss.cache.loader.SharedCacheLoaderTest (of functional)
-------------------------------------------------------
GMS: address is 127.0.0.1:33047
-------------------------------------------------------
-------------------------------------------------------
GMS: address is 127.0.0.1:33048
-------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.501 sec
Running org.jboss.cache.loader.PreloadTest (of functional)
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.379 sec
Results :
Tests run: 2683, Failures: 0, Errors: 0, Skipped: 0
[HUDSON] Recording test results
[INFO] Preparing surefire-report:report-only
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-compiler-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-eclipse-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-jxr-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-pmd-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-surefire-report-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.codehaus.mojo:findbugs-maven-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.codehaus.mojo:javancss-maven-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.codehaus.mojo:taglist-maven-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-project-info-reports-plugin. The plugin artifact has changed.
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] Preparing findbugs:findbugs
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [site:site]
[FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven-site-plugin]
urls[0] = file:/home/hudson/.m2/repository/org/apache/maven/plugins/maven-site-plugin/2.0-beta-6/maven-site-plugin-2.0-beta-6.jar
urls[1] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.jar
urls[2] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.0-alpha-10/doxia-module-xhtml-1.0-alpha-10.jar
urls[3] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-core/1.0-alpha-10/doxia-core-1.0-alpha-10.jar
urls[4] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-10/doxia-decoration-model-1.0-alpha-10.jar
urls[5] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-10/doxia-site-renderer-1.0-alpha-10.jar
urls[6] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
urls[7] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
urls[8] = file:/home/hudson/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
urls[9] = file:/home/hudson/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
urls[10] = file:/home/hudson/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
urls[11] = file:/home/hudson/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
urls[12] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-apt/1.0-alpha-10/doxia-module-apt-1.0-alpha-10.jar
urls[13] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.0-alpha-10/doxia-module-fml-1.0-alpha-10.jar
urls[14] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-xdoc/1.0-alpha-10/doxia-module-xdoc-1.0-alpha-10.jar
urls[15] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
urls[16] = file:/home/hudson/.m2/repository/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.jar
urls[17] = file:/home/hudson/.m2/repository/org/mortbay/jetty/jetty-util/6.1.5/jetty-util-6.1.5.jar
urls[18] = file:/home/hudson/.m2/repository/org/mortbay/jetty/servlet-api-2.5/6.1.5/servlet-api-2.5-6.1.5.jar
[FATAL ERROR] Container realm = plexus.core.maven
urls[0] = file:/home/hudson/.m2/repository/slide/slide-webdavlib/2.1/slide-webdavlib-2.1.jar
urls[1] = file:/home/hudson/.m2/repository/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar
urls[2] = file:/home/hudson/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
urls[3] = file:/home/hudson/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
urls[4] = file:/home/hudson/.m2/repository/de/zeigermann/xml/xml-im-exporter/1.1/xml-im-exporter-1.1.jar
urls[5] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[6] = file:/home/hudson/.m2/repository/org/apache/maven/wagon/wagon-webdav/1.0-beta-2/wagon-webdav-1.0-beta-2.jar
[HUDSON] Archiving /home/hudson/hudson_workspace/workspace/jboss-cache-core-2.1.X-jdk1.5/./pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/maven/artifact/Artifact
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/maven/artifact/Artifact
at org.apache.maven.plugin.jxr.AbstractJxrReport.constructSourceDirs(AbstractJxrReport.java:436)
at org.apache.maven.plugin.jxr.AbstractJxrReport.canGenerateReport(AbstractJxrReport.java:454)
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.filterReports(AbstractSiteRenderingMojo.java:421)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:77)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:136)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at hudson.maven.agent.Main.launch(Main.java:97)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:129)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:52)
at hudson.remoting.UserRequest.perform(UserRequest.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:23)
at hudson.remoting.Request$2.run(Request.java:200)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 155 minutes 23 seconds
[INFO] Finished at: Sun Sep 14 12:44:34 EDT 2008
[INFO] Final Memory: 38M/94M
[INFO] ------------------------------------------------------------------------
Waiting for Hudson to finish collecting data
17 years, 1 month
JBoss Cache SVN: r6724 - in searchable/trunk: src/main/java/org/jboss/cache/search and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: navssurtani
Date: 2008-09-15 09:49:14 -0400 (Mon, 15 Sep 2008)
New Revision: 6724
Added:
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheProfilerTest.java
Modified:
searchable/trunk/pom.xml
searchable/trunk/src/main/java/org/jboss/cache/search/CacheQuery.java
searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java
searchable/trunk/src/main/java/org/jboss/cache/search/LazyQueryResultIterator.java
searchable/trunk/src/main/java/org/jboss/cache/search/PojoTransactionContext.java
searchable/trunk/src/main/java/org/jboss/cache/search/QueryResultIteratorImpl.java
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheConfiguration.java
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheImpl.java
searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java
searchable/trunk/src/main/java/org/jboss/cache/search/SearchablePojoListener.java
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheTest.java
searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalPOJOCacheTest.java
Log:
Cleaned up PMD warnings from hudson
Modified: searchable/trunk/pom.xml
===================================================================
--- searchable/trunk/pom.xml 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/pom.xml 2008-09-15 13:49:14 UTC (rev 6724)
@@ -40,7 +40,13 @@
<version>1.0.4</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-pojo</artifactId>
+ <version>2.2.0.CR7</version>
+ </dependency>
+
<!-- Test dependencies -->
<dependency>
@@ -57,14 +63,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-pojo</artifactId>
- <version>2.2.0.CR5</version>
- <scope>test</scope>
- </dependency>
-
-
</dependencies>
<build>
<plugins>
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/CacheQuery.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/CacheQuery.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/CacheQuery.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -82,14 +82,6 @@
void setMaxResults(int numResults);
/**
- * Defines scrollable result fetch size
- *
- * @param size to be set
- */
-
- void setFetchSize(int size);
-
- /**
* Gets the integer number of results.
*
* @return integer number of results.
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/CacheQueryImpl.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -24,7 +24,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.*;
import org.hibernate.HibernateException;
@@ -37,8 +36,6 @@
import org.hibernate.search.filter.ChainedFilter;
import org.hibernate.search.filter.FilterKey;
import org.hibernate.search.query.FullTextFilterImpl;
-import org.hibernate.search.reader.ReaderProvider;
-import static org.hibernate.search.reader.ReaderProviderHelper.getIndexReaders;
import org.hibernate.search.store.DirectoryProvider;
import org.hibernate.transform.ResultTransformer;
import org.jboss.cache.Cache;
@@ -73,7 +70,6 @@
private Set<Class> classesAndSubclasses;
private boolean needClassFilterClause;
private Query luceneQuery;
- private int fetchSize;
private String[] indexProjection;
private ResultTransformer resultTransformer;
CacheEntityLoader entityLoader;
@@ -360,16 +356,7 @@
}
this.maxResults = maxResults;
}
-
- public void setFetchSize(int fetchSize)
- {
- if (fetchSize <= 0)
- {
- throw new IllegalArgumentException("'fetch size' parameter less than or equals to 0");
- }
- this.fetchSize = fetchSize;
- }
-
+
private IndexSearcher buildSearcher(SearchFactoryImplementor searchFactoryImplementor)
{
Map<Class, DocumentBuilder<Object>> builders = searchFactoryImplementor.getDocumentBuilders();
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/LazyQueryResultIterator.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/LazyQueryResultIterator.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/LazyQueryResultIterator.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -22,7 +22,6 @@
package org.jboss.cache.search;
-import org.jboss.cache.search.CacheEntityLoader;
import org.hibernate.search.engine.DocumentExtractor;
import org.hibernate.search.engine.SearchFactoryImplementor;
import org.apache.lucene.search.Hits;
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/PojoTransactionContext.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/PojoTransactionContext.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/PojoTransactionContext.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -1,72 +1,72 @@
-///*
-// * JBoss, Home of Professional Open Source
-// * Copyright ${year}, Red Hat Middleware LLC, and individual contributors
-// * by the @authors tag. See the copyright.txt in the distribution for a
-// * full listing of individual contributors.
-// *
-// * This is free software; you can redistribute it and/or modify it
-// * under the terms of the GNU Lesser General Public License as
-// * published by the Free Software Foundation; either version 2.1 of
-// * the License, or (at your option) any later version.
-// *
-// * This software is distributed in the hope that it will be useful,
-// * but WITHOUT ANY WARRANTY; without even the implied warranty of
-// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// * Lesser General Public License for more details.
-// *
-// * You should have received a copy of the GNU Lesser General Public
-// * License along with this software; if not, write to the Free
-// * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-// * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-// */
-//
-//package org.jboss.cache.search;
-//
-//import org.hibernate.search.transaction.TransactionContext;
-//import org.jboss.cache.pojo.notification.event.Event;
-//
-//import javax.transaction.Synchronization;
-//import javax.transaction.Transaction;
-//
-///**
-// * @author Navin Surtani (<a href="mailto:nsurtani@redhat.com">nsurtani(a)redhat.com</a>)
-// */
-//public class PojoTransactionContext implements TransactionContext
-//{
-// Event event;
-//
-// public PojoTransactionContext(Event event)
-// {
-// if (event == null) throw new NullPointerException("event cannot be null");
-// this.event = event;
-//
-// }
-// public boolean isTxInProgress()
-// {
-// return (event.getContext().getTransaction() != null);
-//
-// }
-//
-// public Object getTransactionIdentifier()
-// {
-// return event.getContext().getTransaction();
-// }
-//
-// public void registerSynchronization(Synchronization synchronization)
-// {
-// Transaction transaction = event.getContext().getTransaction();
-//
-// if (transaction != null)
-// {
-//
-// try
-// {
-// transaction.registerSynchronization(synchronization);
-// }
-// catch (Exception e)
-// {
-// throw new RuntimeException(e);
-// }
-// }
-// }
-//}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cache.search;
+
+import org.hibernate.search.backend.TransactionContext;
+import org.jboss.cache.pojo.notification.event.Event;
+
+import javax.transaction.Synchronization;
+import javax.transaction.Transaction;
+
+/**
+ * @author Navin Surtani (<a href="mailto:nsurtani@redhat.com">nsurtani(a)redhat.com</a>)
+ */
+public class PojoTransactionContext implements TransactionContext
+{
+ Event event;
+
+ public PojoTransactionContext(Event event)
+ {
+ if (event == null) throw new NullPointerException("event cannot be null");
+ this.event = event;
+
+ }
+ public boolean isTransactionInProgress()
+ {
+ return (event.getContext().getTransaction() != null);
+
+ }
+
+ public Object getTransactionIdentifier()
+ {
+ return event.getContext().getTransaction();
+ }
+
+ public void registerSynchronization(Synchronization synchronization)
+ {
+ Transaction transaction = event.getContext().getTransaction();
+
+ if (transaction != null)
+ {
+
+ try
+ {
+ transaction.registerSynchronization(synchronization);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+}
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/QueryResultIteratorImpl.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/QueryResultIteratorImpl.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/QueryResultIteratorImpl.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -22,7 +22,6 @@
package org.jboss.cache.search;
-import org.jboss.cache.Cache;
import java.util.List;
import java.util.NoSuchElementException;
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheConfiguration.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheConfiguration.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheConfiguration.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -23,8 +23,6 @@
package org.jboss.cache.search;
import org.hibernate.search.cfg.SearchConfiguration;
-import org.hibernate.mapping.PersistentClass;
-import org.hibernate.mapping.RootClass;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import java.util.Iterator;
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheImpl.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheImpl.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCacheImpl.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -23,7 +23,6 @@
package org.jboss.cache.search;
import org.apache.lucene.search.Query;
-import org.hibernate.search.impl.SearchFactoryImpl;
import org.hibernate.search.engine.SearchFactoryImplementor;
import org.jboss.cache.Cache;
import org.jboss.cache.CacheException;
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/SearchableCoreListener.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -22,7 +22,6 @@
package org.jboss.cache.search;
-import org.hibernate.search.impl.SearchFactoryImpl;
import org.hibernate.search.backend.TransactionContext;
import org.hibernate.search.backend.Work;
import org.hibernate.search.backend.WorkType;
Modified: searchable/trunk/src/main/java/org/jboss/cache/search/SearchablePojoListener.java
===================================================================
--- searchable/trunk/src/main/java/org/jboss/cache/search/SearchablePojoListener.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/main/java/org/jboss/cache/search/SearchablePojoListener.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -1,93 +1,100 @@
-///*
-// * JBoss, Home of Professional Open Source
-// * Copyright ${year}, Red Hat Middleware LLC, and individual contributors
-// * by the @authors tag. See the copyright.txt in the distribution for a
-// * full listing of individual contributors.
-// *
-// * This is free software; you can redistribute it and/or modify it
-// * under the terms of the GNU Lesser General Public License as
-// * published by the Free Software Foundation; either version 2.1 of
-// * the License, or (at your option) any later version.
-// *
-// * This software is distributed in the hope that it will be useful,
-// * but WITHOUT ANY WARRANTY; without even the implied warranty of
-// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// * Lesser General Public License for more details.
-// *
-// * You should have received a copy of the GNU Lesser General Public
-// * License along with this software; if not, write to the Free
-// * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-// * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-// */
-//
-//package org.jboss.cache.search;
-//
-//import org.hibernate.search.impl.SearchFactoryImpl;
-//import org.jboss.cache.notifications.event.NodeModifiedEvent;
-//import org.jboss.cache.pojo.notification.annotation.*;
-//import org.jboss.cache.pojo.notification.event.AttachedEvent;
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//
-//import javax.transaction.Transaction;
-//
-///**
-// * @author Navin Surtani (<a href="mailto:nsurtani@redhat.com">nsurtani(a)redhat.com</a>)
-// */
-//
-////@PojoCacheListener
-//public class SearchablePojoListener //extends
-//{
-//// private SearchFactoryImpl searchFactory;
-//// private static final Log log = LogFactory.getLog(SearchablePojoListener.class);
-////
-//// public SearchablePojoListener(SearchFactoryImpl searchFactory)
-//// {
-//// this.searchFactory = searchFactory;
-//// }
-//
-// /**
-// * Takes in a NodeModifiedEvent and updates the Lucene indexes using methods on the NodeModifiedEvent class.
-// *
-// * @param event that has occured - or a node that has been changed. {@link org.jboss.cache.notifications.event.NodeModifiedEvent}
-// * @throws InvalidKeyException if an invalid key is given.
-// */
-//
-//// @Attached
-//// public void handleAttach(AttachedEvent event)
-//// {
-//// Object added = event.getSource();
-//// }
-//
-//
-//// @Detached
-//// @FieldModified
-//// @ListModified
-//// @ArrayModified
-//// @SetModified
-//// @MapModified
-//// public void updateLuceneIndexes(NodeModifiedEvent event) throws InvalidKeyException
-//// {
-////
-//// if (log.isTraceEnabled()) log.trace("You have entered the PojoListener for Searchable Cache");
-//// if (!event.isPre())
-//// {
-//// if (log.isTraceEnabled()) log.trace("event.isPre is false. Going to start updating indexes");
-////
-////
-//// switch (event.getModificationType())
-//// {
-//// case PUT_MAP:
-//// case PUT_DATA:
-//// if (log.isTraceEnabled()) log.trace("put() has been called on cache. Going to handle the data.");
-//// handlePutData(event, searchFactory);
-//// break;
-//// case REMOVE_DATA:
-//// handleDeleteData(event, searchFactory);
-//// break;
-//// }
-//// }
-//// }
-//
-//
-//}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cache.search;
+
+import org.hibernate.search.impl.SearchFactoryImpl;
+import org.hibernate.search.backend.TransactionContext;
+import org.hibernate.search.backend.Work;
+import org.hibernate.search.backend.WorkType;
+import org.hibernate.search.engine.SearchFactoryImplementor;
+import org.jboss.cache.notifications.event.NodeModifiedEvent;
+import org.jboss.cache.pojo.notification.annotation.*;
+import org.jboss.cache.pojo.notification.event.AttachedEvent;
+import org.jboss.cache.pojo.notification.event.DetachedEvent;
+import org.jboss.cache.pojo.notification.event.Event;
+import org.jboss.cache.pojo.PojoCache;
+import org.jboss.cache.Fqn;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.transaction.Transaction;
+
+/**
+ * @author Navin Surtani (<a href="mailto:nsurtani@redhat.com">nsurtani(a)redhat.com</a>)
+ */
+
+@PojoCacheListener
+public class SearchablePojoListener
+{
+ private SearchFactoryImplementor searchFactory;
+ private static final Log log = LogFactory.getLog(SearchablePojoListener.class);
+ private String pojoKey = "pojoKey";
+
+ public SearchablePojoListener(SearchFactoryImplementor searchFactory)
+ {
+ this.searchFactory = searchFactory;
+ }
+
+ /**
+ * Takes in a NodeModifiedEvent and updates the Lucene indexes using methods on the NodeModifiedEvent class.
+ *
+ * @param event that has occured - or a node that has been changed. {@link org.jboss.cache.notifications.event.NodeModifiedEvent}
+ * @throws InvalidKeyException if an invalid key is given.
+ */
+
+ @Attached
+ public void handleAttach(AttachedEvent event) throws InvalidKeyException
+ {
+ System.out.println("Pojocache.attach() called");
+ Object added = event.getSource();
+ Fqn fqn = event.getContext().getPojoCache().getInternalFqn(added);
+
+ CacheEntityId cacheEntityId = new CacheEntityId(fqn, pojoKey);
+
+ TransactionContext ctx = new PojoTransactionContext(event);
+
+ searchFactory.getWorker().performWork(new Work(added, cacheEntityId.getDocumentId(), WorkType.ADD), ctx);
+ }
+
+
+ @Detached
+ public void handleDetach (DetachedEvent event) throws InvalidKeyException
+ {
+ Object deleted = event.getSource();
+ Fqn fqn = event.getContext().getPojoCache().getInternalFqn(deleted);
+
+ CacheEntityId cacheEntityId = new CacheEntityId(fqn, pojoKey);
+
+ TransactionContext ctx = new PojoTransactionContext(event);
+
+ searchFactory.getWorker().performWork(new Work(deleted, cacheEntityId.getDocumentId(), WorkType.DELETE), ctx);
+ }
+
+
+ //TODO: Sort out updating Lucene for the following annotations: -
+// @FieldModified
+// @ListModified
+// @ArrayModified
+// @SetModified
+
+}
Added: searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheProfilerTest.java
===================================================================
--- searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheProfilerTest.java (rev 0)
+++ searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheProfilerTest.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -0,0 +1,250 @@
+package org.jboss.cache.search.blackbox;
+
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.queryParser.ParseException;
+import org.apache.lucene.queryParser.QueryParser;
+import org.apache.lucene.queryParser.MultiFieldQueryParser;
+import org.apache.lucene.search.*;
+import org.apache.lucene.index.Term;
+import org.jboss.cache.Cache;
+import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.search.CacheQuery;
+import org.jboss.cache.search.QueryResultIterator;
+import org.jboss.cache.search.SearchableCache;
+import org.jboss.cache.search.SearchableCacheFactory;
+import org.jboss.cache.search.helper.IndexCleanUp;
+import org.jboss.cache.search.test.Person;
+import org.testng.annotations.*;
+
+import java.util.List;
+import java.util.Iterator;
+import java.io.File;
+
+/**
+ * @author Navin Surtani (<a href="mailto:nsurtani@redhat.com">nsurtani(a)redhat.com</a>)
+ */
+
+@Test(groups = "functional", enabled = false)
+public class LocalCacheProfilerTest
+{
+ SearchableCache searchableCache;
+ Person person1;
+ Person person2;
+ Person person3;
+ Person person4;
+ Person person5;
+ Person person6;
+ QueryParser queryParser;
+ Query luceneQuery;
+ CacheQuery cacheQuery;
+ List found;
+ String key1 = "Navin";
+ String key2 = "BigGoat";
+ String key3 = "MiniGoat";
+
+ @BeforeTest
+ public void setUp()
+ {
+ Cache coreCache = new DefaultCacheFactory().createCache();
+ searchableCache = new SearchableCacheFactory().createSearchableCache(coreCache, Person.class);
+
+ person1 = new Person();
+ person1.setName("Navin Surtani");
+ person1.setBlurb("Likes playing WoW");
+
+ person2 = new Person();
+ person2.setName("Big Goat");
+ person2.setBlurb("Eats grass");
+
+ person3 = new Person();
+ person3.setName("Mini Goat");
+ person3.setBlurb("Eats cheese");
+
+ person5 = new Person();
+ person5.setName("Smelly Cat");
+ person5.setBlurb("Eats fish");
+
+ //Put the 3 created objects in the searchableCache.
+ searchableCache.put(Fqn.fromString("/a/b/c"), key1, person1);
+ searchableCache.put(Fqn.fromString("/a/b/d"), key2, person2);
+ searchableCache.put(Fqn.fromString("/a/b/c"), key3, person3);
+
+ }
+
+ @AfterTest
+ public void tearDown()
+ {
+ if (searchableCache != null) searchableCache.stop();
+ IndexCleanUp.cleanUpIndexes();
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testSimple() throws ParseException
+ {
+ queryParser = new QueryParser("blurb", new StandardAnalyzer());
+ luceneQuery = queryParser.parse("playing");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+
+ found = cacheQuery.list();
+
+ assert found.size() == 1;
+ assert found.get(0).equals(person1);
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testSimpleIterator() throws ParseException
+ {
+ queryParser = new QueryParser("blurb", new StandardAnalyzer());
+ luceneQuery = queryParser.parse("playing");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+
+ QueryResultIterator found = cacheQuery.iterator();
+
+ assert found.isFirst();
+ assert found.isLast();
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testMultipleResults() throws ParseException
+ {
+
+ queryParser = new QueryParser("name", new StandardAnalyzer());
+
+ luceneQuery = queryParser.parse("goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 2;
+ assert found.get(0) == person2;
+ assert found.get(1) == person3;
+
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testModified() throws ParseException
+ {
+ queryParser = new QueryParser("blurb", new StandardAnalyzer());
+ luceneQuery = queryParser.parse("playing");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+
+ found = cacheQuery.list();
+
+ assert found.size() == 1;
+ assert found.get(0).equals(person1);
+
+ person1.setBlurb("Likes pizza");
+ searchableCache.put(Fqn.fromString("/a/b/c/"), key1, person1);
+
+ queryParser = new QueryParser("blurb", new StandardAnalyzer());
+ luceneQuery = queryParser.parse("pizza");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+
+ found = cacheQuery.list();
+
+ assert found.size() == 1;
+ assert found.get(0).equals(person1);
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testAdded() throws ParseException
+ {
+ queryParser = new QueryParser("name", new StandardAnalyzer());
+
+ luceneQuery = queryParser.parse("Goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 2 : "Size of list should be 2";
+ assert found.contains(person2);
+ assert found.contains(person3);
+ assert !found.contains(person4) : "This should not contain object person4";
+
+ person4 = new Person();
+ person4.setName("Mighty Goat");
+ person4.setBlurb("Also eats grass");
+
+ searchableCache.put(Fqn.fromString("/r/a/m/"), "Ram", person4);
+
+ luceneQuery = queryParser.parse("Goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 3 : "Size of list should be 3";
+ assert found.contains(person2);
+ assert found.contains(person3);
+ assert found.contains(person4) : "This should now contain object person4";
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testRemoved() throws ParseException
+ {
+ queryParser = new QueryParser("name", new StandardAnalyzer());
+
+ luceneQuery = queryParser.parse("Goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 2;
+ assert found.contains(person2);
+ assert found.contains(person3) : "This should still contain object person3";
+
+ searchableCache.remove(Fqn.fromString("/a/b/c/"), key3);
+
+ luceneQuery = queryParser.parse("Goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 1;
+ assert found.contains(person2);
+ assert !found.contains(person3) : "The search should not return person3";
+
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testSetSort() throws ParseException
+ {
+ person2.setAge(35);
+ person3.setAge(12);
+
+ Sort sort = new Sort("age");
+
+ queryParser = new QueryParser("name", new StandardAnalyzer());
+
+ luceneQuery = queryParser.parse("Goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 2;
+
+ cacheQuery.setSort(sort);
+
+ found = cacheQuery.list();
+
+ assert found.size() == 2;
+ assert found.get(0).equals(person2);
+ assert found.get(1).equals(person3);
+ }
+
+ @Test (invocationCount = 200000, enabled = false)
+ public void testSetFilter() throws ParseException
+ {
+ queryParser = new QueryParser("name", new StandardAnalyzer());
+
+ luceneQuery = queryParser.parse("goat");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+ found = cacheQuery.list();
+
+ assert found.size() == 2;
+
+ Filter filter = new PrefixFilter(new Term("blurb", "cheese"));
+
+ cacheQuery.setFilter(filter);
+
+ found = cacheQuery.list();
+
+ assert found.size() == 1;
+
+ }
+
+}
Modified: searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheTest.java
===================================================================
--- searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheTest.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalCacheTest.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -43,7 +43,7 @@
String key2 = "BigGoat";
String key3 = "MiniGoat";
- @BeforeTest
+ @BeforeMethod
public void setUp()
{
Cache coreCache = new DefaultCacheFactory().createCache();
@@ -72,7 +72,7 @@
}
- @AfterTest
+ @AfterMethod
public void tearDown()
{
if (searchableCache != null) searchableCache.stop();
@@ -103,8 +103,6 @@
assert found.isLast();
}
-
- @Test (invocationCount = 200000)
public void testMultipleResults() throws ParseException
{
@@ -242,4 +240,17 @@
}
+ public void testLazyIterator() throws ParseException
+ {
+ queryParser = new QueryParser("blurb", new StandardAnalyzer());
+ luceneQuery = queryParser.parse("playing");
+ cacheQuery = searchableCache.createQuery(luceneQuery);
+
+ QueryResultIterator found = cacheQuery.lazyIterator();
+
+ assert found.isFirst();
+ assert found.isLast();
+
+ }
+
}
Modified: searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalPOJOCacheTest.java
===================================================================
--- searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalPOJOCacheTest.java 2008-09-15 13:27:53 UTC (rev 6723)
+++ searchable/trunk/src/test/java/org/jboss/cache/search/blackbox/LocalPOJOCacheTest.java 2008-09-15 13:49:14 UTC (rev 6724)
@@ -31,7 +31,7 @@
* @author Navin Surtani (<a href="mailto:nsurtani@redhat.com">nsurtani(a)redhat.com</a>)
*/
-@Test(groups = "functional", enabled = false)
+@Test(groups = "functional", enabled = true)
public class LocalPOJOCacheTest
{
SearchableCache searchableCache;
@@ -90,20 +90,6 @@
found = cacheQuery.list();
- assert found.size() == 1;
-
- if (found.get(0) == null)
- {
- if (log.isTraceEnabled()) log.warn("found.get(0) is null");
-
- }
-
- if (person1 == null)
- {
- if (log.isTraceEnabled()) log.warn("person1 is null");
- }
-
- // assert person1.equals(found.get(0));
}
public void testMultipleResults() throws ParseException
17 years, 1 month
JBoss Cache SVN: r6723 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-09-15 09:27:53 -0400 (Mon, 15 Sep 2008)
New Revision: 6723
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-repl-async.xml
Log:
changed config
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-repl-async.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-repl-async.xml 2008-09-15 11:23:55 UTC (rev 6722)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-3.0.0/conf/mvcc-repl-async.xml 2008-09-15 13:27:53 UTC (rev 6723)
@@ -5,7 +5,7 @@
<stateRetrieval timeout="20000" fetchInMemoryState="false"/>
<transport clusterName="JBossCache-Cluster">
<jgroupsConfig>
- <UDP discard_incompatible_packets="true" enable_bundling="true" enable_diagnostics="false" ip_ttl="2"
+ <UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
mcast_port="45588" mcast_recv_buf_size="100000000" mcast_send_buf_size="640000"
oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="20"
@@ -26,7 +26,7 @@
<pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
<pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
view_bundling="true"/>
- <FC max_credits="5000000" min_threshold="0.2"/>
+ <FC max_credits="500000" min_threshold="0.2"/>
<FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<pbcast.FLUSH timeout="0"/>
17 years, 1 month
Build failed in Hudson: jboss-cache-core-2.1.X-jdk1.6 » JBoss Cache - Core Edition #48
by jboss-qa-internal@redhat.com
See http://hudson.qa.jboss.com/hudson/job/jboss-cache-core-2.1.X-jdk1.6/org.j...
------------------------------------------
started
Building remotely on conf2-linux
$ /qa/tools/opt/jdk1.6.0_03/bin/java -Xmx512m -cp /home/hudson/hudson_workspace/maven-agent.jar:/qa/tools/opt/maven-2.0.9/boot/classworlds-1.1.jar hudson.maven.agent.Main /qa/tools/opt/maven-2.0.9 /qa/services/hudson/hudson_release/WEB-INF/slave.jar /home/hudson/hudson_workspace/maven-interceptor.jar
channel started
[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss Cache - Core Edition
[INFO] task-segment: [clean, site]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/hudson/hudson_workspace/workspace/jboss-cache-core-2.1.X-jdk1.6/target
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-compiler-plugin. The plugin artifact has changed.
[INFO] Reloading plugin container for: org.apache.maven.plugins:maven-eclipse-plugin. The plugin artifact has changed.
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[WARNING] Attempting to build MavenProject instance for Artifact (org.codehaus.mojo:findbugs-maven-plugin:1.2-20080322.132217-15) of type: maven-plugin; constructing POM artifact instead.
Downloading: http://repository.jboss.org/maven2/castor/castor/0.9.9/castor-0.9.9.jar
Downloading: http://repo1.maven.org/maven2//castor/castor/0.9.9/castor-0.9.9.jar
1865K downloaded
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] artifact org.codehaus.mojo:javancss-maven-plugin: checking for updates from snapshots.repository.codehaus.org
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'c5ed783fceb5efb0cab1e9d092eab31766ff20fd'; remote = '' - RETRYING
[INFO] artifact org.codehaus.mojo:javancss-maven-plugin: checking for updates from central
[INFO] snapshot org.codehaus.mojo:javancss-maven-plugin:2.0-beta-3-SNAPSHOT: checking for updates from Main Maven Repo
[INFO] snapshot org.codehaus.mojo:javancss-maven-plugin:2.0-beta-3-SNAPSHOT: checking for updates from snapshots.repository.codehaus.org
Downloading: http://snapshots.repository.codehaus.org/org/codehaus/mojo/javancss-maven...
Downloading: http://snapshots.jboss.org/maven2/org/codehaus/mojo/javancss-maven-plugin...
Downloading: http://repo1.maven.org/maven2//org/codehaus/mojo/javancss-maven-plugin/2....
Downloading: http://snapshots.repository.codehaus.org/org/codehaus/mojo/javancss-maven...
[HUDSON] Archiving /home/hudson/hudson_workspace/workspace/jboss-cache-core-2.1.X-jdk1.6/./pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.codehaus.mojo -DartifactId=javancss-maven-plugin -Dversion=2.0-beta-3-SNAPSHOT -Dpackaging=maven-plugin -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.codehaus.mojo -DartifactId=javancss-maven-plugin -Dversion=2.0-beta-3-SNAPSHOT -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
org.codehaus.mojo:javancss-maven-plugin:maven-plugin:2.0-beta-3-SNAPSHOT
from the specified remote repositories:
snapshots.repository.codehaus.org (http://snapshots.repository.codehaus.org),
snapshots.jboss.org (http://snapshots.jboss.org/maven2),
Main Maven Repo (http://repo1.maven.org/maven2/),
central (http://repo1.maven.org/maven2),
repository.jboss.org (http://repository.jboss.org/maven2)
org.codehaus.mojo:javancss-maven-plugin:maven-plugin:2.0-beta-3-SNAPSHOT
from the specified remote repositories:
snapshots.repository.codehaus.org (http://snapshots.repository.codehaus.org),
snapshots.jboss.org (http://snapshots.jboss.org/maven2),
Main Maven Repo (http://repo1.maven.org/maven2/),
central (http://repo1.maven.org/maven2),
repository.jboss.org (http://repository.jboss.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51 seconds
[INFO] Finished at: Sun Sep 14 10:07:20 EDT 2008
[INFO] Final Memory: 25M/81M
[INFO] ------------------------------------------------------------------------
Waiting for Hudson to finish collecting data
17 years, 1 month