memcache_test.go 428 B

12345678910111213141516171819202122
  1. package dao
  2. import (
  3. "testing"
  4. . "github.com/smartystreets/goconvey/convey"
  5. )
  6. func TestMCInfo(t *testing.T) {
  7. Convey("TestMCInfo", t, func() {
  8. var (
  9. partition int32 = -2233
  10. offset1 int64 = 778899
  11. offset2 int64
  12. err error
  13. )
  14. err = d.SetOffsetCache(c, "test", partition, offset1)
  15. So(err, ShouldBeNil)
  16. offset2, err = d.OffsetCache(c, "test", partition)
  17. So(offset1, ShouldEqual, offset2)
  18. })
  19. }