diff --git a/index/storage_test.go b/index/storage_test.go index c998324e9..8fd31b710 100644 --- a/index/storage_test.go +++ b/index/storage_test.go @@ -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) + + }) }