store: address review comments

This commit is contained in:
dongxu
2015-12-01 12:25:42 +08:00
parent 7fa3f25266
commit ebe3ba92f5
2 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ func newStoreWithRetry(uri string, maxRetries int) (kv.Storage, error) {
break
}
sleepTime := time.Duration(uint64(retrySleepInterval) * uint64(i))
log.Errorf("Waiting store to get ready, sleep %v and try again...", sleepTime)
log.Warnf("Waiting store to get ready, sleep %v and try again...", sleepTime)
time.Sleep(sleepTime)
}
return s, errors.Trace(err)

View File

@ -319,7 +319,7 @@ func (s *testMainSuite) TestRetryOpenStore(c *C) {
_, err := newStoreWithRetry("dummy://dummy-store", 3)
c.Assert(err, NotNil)
elapse := time.Since(begin)
c.Assert(uint64(elapse), Greater, uint64(2*time.Second))
c.Assert(uint64(elapse), GreaterEqual, uint64(3*time.Second))
}
func sessionExec(c *C, se Session, sql string) ([]rset.Recordset, error) {