added cass test

This commit is contained in:
Todd Gruben 2014-01-21 16:50:54 -06:00
parent 9c853959dc
commit 53d207bb35

View file

@ -25,5 +25,19 @@ func TestStorage(t *testing.T) {
So(BitCount(bm), ShouldEqual, 3)
})
Convey("cassandra", t, func() {
storage, _ := NewCassStorage("127.0.0.1", "hotbox")
bm := storage.Fetch(bitmap_id, db, slice)
SetBit(bm, 0)
SetBit(bm, 1)
SetBit(bm, 2)
storage.Store(int64(bitmap_id), db, slice, bm.(*Bitmap))
bm2 := storage.Fetch(bitmap_id, db, slice)
So(BitCount(bm), ShouldEqual, BitCount(bm2))
So(BitCount(bm), ShouldEqual, bm.Count())
So(BitCount(bm), ShouldEqual, 3)
})
}