adjust some of the tests so they pass

This commit is contained in:
travisturner 2014-04-02 09:58:04 -05:00
parent 60423735af
commit 45e4cb40fa
3 changed files with 7 additions and 6 deletions

View file

@ -15,9 +15,10 @@ type CassandraStorage struct {
func BuildSchema() {
/*
"CREATE KEYSPACE IF NOT EXISTS hotbox WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1"
CREATE TABLE IF NOT EXISTS bitmap ( bitmap_id bigint, db varchar, frame varchar, slice int, filter int, ChunkKey bigint, BlockIndex int, block bigint, PRIMARY KEY ((bitmap_id, db, frame,slice),ChunkKey,BlockIndex) )
"
"CREATE KEYSPACE IF NOT EXISTS hotbox WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1"
create keyspace if not exists hotbox with replication = { 'class': 'SimpleStrategy', 'replication_factor' : 1} and durable_writes = true;
CREATE TABLE IF NOT EXISTS bitmap ( bitmap_id bigint, db varchar, frame varchar, slice int, filter int, ChunkKey bigint, BlockIndex int, block bigint, PRIMARY KEY ((bitmap_id, db, frame,slice),ChunkKey,BlockIndex) )
"
*/
}

View file

@ -33,7 +33,7 @@ func TestStorage(t *testing.T) {
*/
c, err := net.DialTimeout("tcp", "127.0.0.1:9042", 100*time.Millisecond)
if err != nil {
fmt.Println("NO cassandra skipping test")
fmt.Println("NO cassandra. Skipping test.")
} else {
c.Close()
Convey("cassandra", t, func() {

View file

@ -14,12 +14,12 @@ func TestQueryPlanner(t *testing.T) {
Convey("Basic query plan", t, func() {
id1 := uuid.RandomUUID()
bm1 := db.Bitmap{10, "general"}
bm1 := db.Bitmap{10, "general", 0}
inputs1 := []QueryInput{&bm1}
query1 := Query{&id1, "get", inputs1, 0, 0}
id2 := uuid.RandomUUID()
bm2 := db.Bitmap{20, "general"}
bm2 := db.Bitmap{20, "general", 0}
inputs2 := []QueryInput{&bm2}
query2 := Query{&id2, "get", inputs2, 0, 0}