Fix the dep on cenkalti

This commit is contained in:
robbiezhang
2018-01-20 02:31:58 +00:00
parent 2ca933fe27
commit d27616776c
18 changed files with 1046 additions and 1 deletions

26
vendor/github.com/cenkalti/backoff/context_test.go generated vendored Normal file
View File

@@ -0,0 +1,26 @@
package backoff
import (
"testing"
"time"
"golang.org/x/net/context"
)
func TestContext(t *testing.T) {
b := NewConstantBackOff(time.Millisecond)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cb := WithContext(b, ctx)
if cb.Context() != ctx {
t.Error("invalid context")
}
cancel()
if cb.NextBackOff() != Stop {
t.Error("invalid next back off")
}
}