1
0
Fork 0

Duration order consistency when multiplying number by time unit

This commit is contained in:
Maxim Fominykh 2019-11-27 01:38:03 +05:00 committed by Traefiker Bot
parent 9ef4f47ba0
commit bd75eddc8e
6 changed files with 6 additions and 6 deletions

View file

@ -349,7 +349,7 @@ func (s *GRPCSuite) TestGRPCBuffer(c *check.C) {
received <- true
}()
err = try.Do(time.Second*10, func() error {
err = try.Do(10*time.Second, func() error {
select {
case <-received:
return nil

View file

@ -705,7 +705,7 @@ func (s *SimpleSuite) TestMirrorCanceled(c *check.C) {
main := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
atomic.AddInt32(&count, 1)
time.Sleep(time.Second * 2)
time.Sleep(2 * time.Second)
}))
mirror1 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {