-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #664 from hector-client/cassandra-2.0.1
Cassandra 2.0.1
- Loading branch information
Showing
10 changed files
with
282 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
core/src/test/java/me/prettyprint/cassandra/service/BaseCassandraClusterTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package me.prettyprint.cassandra.service; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertNotNull; | ||
import java.net.UnknownHostException; | ||
import java.util.List; | ||
import me.prettyprint.cassandra.BaseEmbededServerSetupTest; | ||
import me.prettyprint.hector.api.ddl.KeyspaceDefinition; | ||
import org.apache.cassandra.thrift.NotFoundException; | ||
import org.apache.thrift.TException; | ||
import org.apache.thrift.transport.TTransportException; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
|
||
public class BaseCassandraClusterTest extends BaseEmbededServerSetupTest { | ||
|
||
private ThriftCluster cassandraCluster; | ||
private CassandraHostConfigurator cassandraHostConfigurator; | ||
|
||
@Before | ||
public void setupCase() throws TTransportException, TException, IllegalArgumentException, | ||
NotFoundException, UnknownHostException, Exception { | ||
cassandraHostConfigurator = getCHCForTest(); | ||
cassandraCluster = new ThriftCluster(clusterName, cassandraHostConfigurator); | ||
} | ||
|
||
@Test | ||
public void testDescribeKeyspaces() throws Exception { | ||
List<KeyspaceDefinition> keyspaces = cassandraCluster.describeKeyspaces(); | ||
// System | ||
// Keyspace1 | ||
// system_traces | ||
assertEquals(3,keyspaces.size()); | ||
} | ||
|
||
@Test | ||
public void testDescribeKeyspace() throws Exception { | ||
KeyspaceDefinition keyspaceDetail = cassandraCluster.describeKeyspace("Keyspace1"); | ||
assertNotNull(keyspaceDetail); | ||
assertEquals(22, keyspaceDetail.getCfDefs().size()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
core/src/test/java/me/prettyprint/cassandra/service/template/SuperCfTemplateTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.