Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8a2d037b
Unverified
Commit
8a2d037b
authored
Jul 25, 2018
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the timeout error more specific so users can find it
This makes the error consistent with the timeout filter and also helps the user understand that they requested a specific timeout.
parent
cefca66b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
rest.go
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
+1
-1
webhook.go
test/e2e/apimachinery/webhook.go
+1
-1
No files found.
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
View file @
8a2d037b
...
...
@@ -202,7 +202,7 @@ func finishRequest(timeout time.Duration, fn resultFunc) (result runtime.Object,
case
p
:=
<-
panicCh
:
panic
(
p
)
case
<-
time
.
After
(
timeout
)
:
return
nil
,
errors
.
NewTimeoutError
(
"request did not complete within allowed duration"
,
0
)
return
nil
,
errors
.
NewTimeoutError
(
fmt
.
Sprintf
(
"request did not complete within requested timeout %s"
,
timeout
)
,
0
)
}
}
...
...
test/e2e/apimachinery/webhook.go
View file @
8a2d037b
...
...
@@ -576,7 +576,7 @@ func testWebhook(f *framework.Framework) {
pod
=
hangingPod
(
f
)
_
,
err
=
client
.
CoreV1
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
)
Expect
(
err
)
.
NotTo
(
BeNil
())
expectedTimeoutErr
:=
"
request did not complete within allowed duration
"
expectedTimeoutErr
:=
"
Timeout: request did not complete within requested timeout 30s
"
if
!
strings
.
Contains
(
err
.
Error
(),
expectedTimeoutErr
)
{
framework
.
Failf
(
"expect timeout error %q, got %q"
,
expectedTimeoutErr
,
err
.
Error
())
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment