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
2bc022aa
Commit
2bc022aa
authored
Apr 21, 2016
by
Hongchao Deng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
watcher test: print more info for debugging
parent
5fe6f391
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
watcher_test.go
pkg/storage/etcd3/watcher_test.go
+9
-2
No files found.
pkg/storage/etcd3/watcher_test.go
View file @
2bc022aa
...
@@ -199,9 +199,16 @@ func testCheckResult(t *testing.T, i int, expectEventType watch.EventType, w wat
...
@@ -199,9 +199,16 @@ func testCheckResult(t *testing.T, i int, expectEventType watch.EventType, w wat
func
testCheckStop
(
t
*
testing
.
T
,
i
int
,
w
watch
.
Interface
)
{
func
testCheckStop
(
t
*
testing
.
T
,
i
int
,
w
watch
.
Interface
)
{
select
{
select
{
case
_
,
ok
:=
<-
w
.
ResultChan
()
:
case
e
,
ok
:=
<-
w
.
ResultChan
()
:
if
ok
{
if
ok
{
t
.
Errorf
(
"#%d: ResultChan should have been closed"
,
i
)
var
obj
string
switch
e
.
Object
.
(
type
)
{
case
*
api
.
Pod
:
obj
=
e
.
Object
.
(
*
api
.
Pod
)
.
Name
case
*
unversioned
.
Status
:
obj
=
e
.
Object
.
(
*
unversioned
.
Status
)
.
Message
}
t
.
Errorf
(
"#%d: ResultChan should have been closed. Event: %s. Object: %s"
,
i
,
e
.
Type
,
obj
)
}
}
case
<-
time
.
After
(
wait
.
ForeverTestTimeout
)
:
case
<-
time
.
After
(
wait
.
ForeverTestTimeout
)
:
t
.
Errorf
(
"#%d: time out after waiting 1s on ResultChan"
,
i
)
t
.
Errorf
(
"#%d: time out after waiting 1s on ResultChan"
,
i
)
...
...
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