Modified: cassandra/trunk/test/unit/org/apache/cassandra/service/MoveTest.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/service/MoveTest.java?rev=1160494&r1=1160493&r2=1160494&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/service/MoveTest.java 
(original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/service/MoveTest.java Mon 
Aug 22 23:16:04 2011
@@ -19,12 +19,12 @@
 
 package org.apache.cassandra.service;
 
-import java.math.BigInteger;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.*;
 
 import org.apache.cassandra.config.ConfigurationException;
+import org.apache.cassandra.config.Schema;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
@@ -32,7 +32,6 @@ import com.google.common.collect.HashMul
 import com.google.common.collect.Multimap;
 import org.apache.cassandra.CleanupHelper;
 import org.apache.cassandra.Util;
-import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.KSMetaData;
 import org.apache.cassandra.dht.*;
 import org.apache.cassandra.gms.ApplicationState;
@@ -68,7 +67,7 @@ public class MoveTest extends CleanupHel
         Util.createInitialRing(ss, partitioner, endpointTokens, keyTokens, 
hosts, RING_SIZE);
 
         Map<Token, List<InetAddress>> expectedEndpoints = new HashMap<Token, 
List<InetAddress>>();
-        for (String table : DatabaseDescriptor.getNonSystemTables())
+        for (String table : Schema.instance.getNonSystemTables())
         {
             for (Token token : keyTokens)
             {
@@ -91,7 +90,7 @@ public class MoveTest extends CleanupHel
         assertTrue(tmd.isMoving(hosts.get(MOVING_NODE)));
 
         AbstractReplicationStrategy strategy;
-        for (String table : DatabaseDescriptor.getNonSystemTables())
+        for (String table : Schema.instance.getNonSystemTables())
         {
             strategy = getStrategy(table, tmd);
             for (Token token : keyTokens)
@@ -505,7 +504,7 @@ public class MoveTest extends CleanupHel
 
     private AbstractReplicationStrategy getStrategy(String table, 
TokenMetadata tmd) throws ConfigurationException
     {
-        KSMetaData ksmd =  DatabaseDescriptor.getKSMetaData(table);
+        KSMetaData ksmd = Schema.instance.getKSMetaData(table);
         return AbstractReplicationStrategy.createReplicationStrategy(
                 table,
                 ksmd.strategyClass,

Modified: 
cassandra/trunk/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java?rev=1160494&r1=1160493&r2=1160494&view=diff
==============================================================================
--- 
cassandra/trunk/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java 
(original)
+++ 
cassandra/trunk/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java 
Mon Aug 22 23:16:04 2011
@@ -23,8 +23,7 @@ package org.apache.cassandra.thrift;
 
 import java.nio.ByteBuffer;
 
-import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.config.*;
 import org.apache.cassandra.db.marshal.AsciiType;
 import org.apache.cassandra.db.marshal.UTF8Type;
 
@@ -32,14 +31,8 @@ import org.junit.Test;
 
 import org.apache.cassandra.CleanupHelper;
 import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.db.marshal.AsciiType;
-import org.apache.cassandra.db.marshal.UTF8Type;
 import org.apache.cassandra.utils.FBUtilities;
 
-import java.util.concurrent.Callable;
-
 public class ThriftValidationTest extends CleanupHelper
 {
     @Test(expected=InvalidRequestException.class)
@@ -57,7 +50,7 @@ public class ThriftValidationTest extend
     @Test
     public void testColumnValueSizeForIndexedColumn() throws 
ConfigurationException, InvalidRequestException
     {
-        CfDef cfDef = 
CFMetaData.convertToThrift(DatabaseDescriptor.getCFMetaData("Keyspace1", 
"Standard1"));
+        CfDef cfDef = 
CFMetaData.convertToThrift(Schema.instance.getCFMetaData("Keyspace1", 
"Standard1"));
         ByteBuffer columnName = AsciiType.instance.fromString("indexed");
 
         // add an indexed column definition
@@ -106,7 +99,7 @@ public class ThriftValidationTest extend
     @Test
     public void testColumnNameEqualToKeyAlias()
     {
-        CFMetaData metaData = DatabaseDescriptor.getCFMetaData("Keyspace1", 
"Standard1");
+        CFMetaData metaData = Schema.instance.getCFMetaData("Keyspace1", 
"Standard1");
         CfDef newMetadata = CFMetaData.convertToThrift(metaData);
 
         boolean gotException = false;


Reply via email to