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
2b8854ba
Commit
2b8854ba
authored
Dec 22, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close watchers in tests
parent
0cdd2aba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
etcd_test.go
pkg/registry/generic/etcd/etcd_test.go
+1
-0
etcd_watcher_test.go
pkg/storage/etcd/etcd_watcher_test.go
+5
-0
No files found.
pkg/registry/generic/etcd/etcd_test.go
View file @
2b8854ba
...
...
@@ -605,6 +605,7 @@ func TestEtcdWatch(t *testing.T) {
}
}
}
wi
.
Stop
()
}
server
.
Terminate
(
t
)
...
...
pkg/storage/etcd/etcd_watcher_test.go
View file @
2b8854ba
...
...
@@ -246,6 +246,7 @@ func TestWatch(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
defer
watching
.
Stop
()
// Test normal case
pod
:=
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"foo"
}}
...
...
@@ -292,6 +293,7 @@ func TestWatchEtcdState(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
defer
watching
.
Stop
()
endpoint
:=
&
api
.
Endpoints
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"foo"
},
...
...
@@ -356,6 +358,7 @@ func TestWatchFromZeroIndex(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
defer
watching
.
Stop
()
// marked as modified b/c of concatenation
event
:=
<-
watching
.
ResultChan
()
...
...
@@ -391,6 +394,7 @@ func TestWatchListFromZeroIndex(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
defer
watching
.
Stop
()
// creates key/foo which should trigger the WatchList for "key"
pod
:=
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"foo"
}}
...
...
@@ -423,6 +427,7 @@ func TestWatchListIgnoresRootKey(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
defer
watching
.
Stop
()
// creates key/foo which should trigger the WatchList for "key"
err
=
h
.
Create
(
context
.
TODO
(),
key
,
pod
,
pod
,
0
)
...
...
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