Author: jbellis
Date: Wed Jul 27 01:43:16 2011
New Revision: 1151308
URL: http://svn.apache.org/viewvc?rev=1151308&view=rev
Log:
speed up unit tests by one minute
Modified:
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/InitClientTest.java
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/StorageServiceClientTest.java
Modified:
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
URL:
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java?rev=1151308&r1=1151307&r2=1151308&view=diff
==============================================================================
---
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java
Wed Jul 27 01:43:16 2011
@@ -335,6 +335,11 @@ public class StorageService implements I
public synchronized void initClient() throws IOException,
ConfigurationException
{
+ initClient(RING_DELAY);
+ }
+
+ public synchronized void initClient(int delay) throws IOException,
ConfigurationException
+ {
if (initialized)
{
if (!isClientMode)
@@ -352,7 +357,7 @@ public class StorageService implements I
// sleep a while to allow gossip to warm up (the other nodes need to
know about this one before they can reply).
try
{
- Thread.sleep(RING_DELAY);
+ Thread.sleep(delay);
}
catch (Exception ex)
{
Modified:
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/InitClientTest.java
URL:
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/InitClientTest.java?rev=1151308&r1=1151307&r2=1151308&view=diff
==============================================================================
---
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/InitClientTest.java
(original)
+++
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/InitClientTest.java
Wed Jul 27 01:43:16 2011
@@ -30,6 +30,6 @@ public class InitClientTest // extends C
@Test
public void testInitClientStartup() throws IOException,
ConfigurationException
{
- StorageService.instance.initClient();
+ StorageService.instance.initClient(0);
}
}
Modified:
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/StorageServiceClientTest.java
URL:
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/StorageServiceClientTest.java?rev=1151308&r1=1151307&r2=1151308&view=diff
==============================================================================
---
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/StorageServiceClientTest.java
(original)
+++
cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/service/StorageServiceClientTest.java
Wed Jul 27 01:43:16 2011
@@ -36,7 +36,7 @@ public class StorageServiceClientTest
{
CleanupHelper.mkdirs();
CleanupHelper.cleanup();
- StorageService.instance.initClient();
+ StorageService.instance.initClient(0);
// verify that no storage directories were created.
for (String path : DatabaseDescriptor.getAllDataFileLocations())