projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
21639: Improve critical path of read() from cache
[arvados.git]
/
services
/
ws
/
permission_test.go
diff --git
a/services/ws/permission_test.go
b/services/ws/permission_test.go
index 023656c01fd93dc3a912283682ffc9eda59c7e6b..2a22eae609d4c154d5ccff8174ee316662b7da4c 100644
(file)
--- a/
services/ws/permission_test.go
+++ b/
services/ws/permission_test.go
@@
-17,7
+17,11
@@
var _ = check.Suite(&permSuite{})
type permSuite struct{}
func (s *permSuite) TestCheck(c *check.C) {
type permSuite struct{}
func (s *permSuite) TestCheck(c *check.C) {
- pc := newPermChecker(*(arvados.NewClientFromEnv())).(*cachingPermChecker)
+ client := arvados.NewClientFromEnv()
+ // Disable auto-retry
+ client.Timeout = 0
+
+ pc := newPermChecker(client).(*cachingPermChecker)
setToken := func(label, token string) {
c.Logf("...%s token %q", label, token)
pc.SetToken(token)
setToken := func(label, token string) {
c.Logf("...%s token %q", label, token)
pc.SetToken(token)
@@
-69,7
+73,7
@@
func (s *permSuite) TestCheck(c *check.C) {
pc.SetToken(arvadostest.ActiveToken)
c.Log("...network error")
pc.SetToken(arvadostest.ActiveToken)
c.Log("...network error")
- pc.
Client
.APIHost = "127.0.0.1:9"
+ pc.
ac
.APIHost = "127.0.0.1:9"
wantError(arvadostest.UserAgreementCollection)
wantError(arvadostest.FooBarDirCollection)
wantError(arvadostest.UserAgreementCollection)
wantError(arvadostest.FooBarDirCollection)