cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r993084 - /cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java
Date Mon, 06 Sep 2010 16:15:19 GMT
Author: jbellis
Date: Mon Sep  6 16:15:18 2010
New Revision: 993084

URL: http://svn.apache.org/viewvc?rev=993084&view=rev
Log:
Switch to TFramedTransport in TestRingCache.  patch by Stu Hood; reviewed by jbellis for CASSANDRA-1434

Modified:
    cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java

Modified: cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java?rev=993084&r1=993083&r2=993084&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java Mon Sep  6 16:15:18
2010
@@ -26,6 +26,7 @@ import org.apache.commons.lang.StringUti
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.thrift.*;
 import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TFramedTransport;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
 
@@ -47,12 +48,10 @@ public class TestRingCache
     {
         /* Establish a thrift connection to the cassandra instance */
         TSocket socket = new TSocket(server, port);
-        TTransport transport;
         System.out.println(" connected to " + server + ":" + port + ".");
-        transport = socket;
-        TBinaryProtocol binaryProtocol = new TBinaryProtocol(transport);
+        TBinaryProtocol binaryProtocol = new TBinaryProtocol(new TFramedTransport(socket));
         Cassandra.Client cassandraClient = new Cassandra.Client(binaryProtocol);
-        transport.open();
+        socket.open();
         thriftClient = cassandraClient;
     }
 



Mime
View raw message