-
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.
Cleaned up unit tests so all tests now pass
- Loading branch information
Shane Perry
committed
May 28, 2014
1 parent
fce4bd1
commit f2fc542
Showing
6 changed files
with
104 additions
and
105 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.