From 53d207bb350ea2b68bd7d240b444af0de642c9fe Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Tue, 21 Jan 2014 16:50:54 -0600 Subject: [PATCH] added cass test --- index/storage_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) + + }) }