store: address review comments
This commit is contained in:
2
tidb.go
2
tidb.go
@ -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)
|
||||
|
||||
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user