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
2775a52e
Commit
2775a52e
authored
Mar 15, 2017
by
Bobby Salamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix waitForScheduler in scheduer predicates e2e tests
parent
355f576c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
44 deletions
+60
-44
events.go
test/e2e/common/events.go
+4
-2
predicates.go
test/e2e/scheduling/predicates.go
+56
-42
No files found.
test/e2e/common/events.go
View file @
2775a52e
...
@@ -34,9 +34,11 @@ import (
...
@@ -34,9 +34,11 @@ import (
.
"github.com/onsi/gomega"
.
"github.com/onsi/gomega"
)
)
type
Action
func
()
error
// Returns true if a node update matching the predicate was emitted from the
// Returns true if a node update matching the predicate was emitted from the
// system after performing the supplied action.
// system after performing the supplied action.
func
ObserveNodeUpdateAfterAction
(
f
*
framework
.
Framework
,
nodeName
string
,
nodePredicate
func
(
*
v1
.
Node
)
bool
,
action
func
()
error
)
(
bool
,
error
)
{
func
ObserveNodeUpdateAfterAction
(
f
*
framework
.
Framework
,
nodeName
string
,
nodePredicate
func
(
*
v1
.
Node
)
bool
,
action
Action
)
(
bool
,
error
)
{
observedMatchingNode
:=
false
observedMatchingNode
:=
false
nodeSelector
:=
fields
.
OneTermEqualSelector
(
"metadata.name"
,
nodeName
)
nodeSelector
:=
fields
.
OneTermEqualSelector
(
"metadata.name"
,
nodeName
)
informerStartedChan
:=
make
(
chan
struct
{})
informerStartedChan
:=
make
(
chan
struct
{})
...
@@ -94,7 +96,7 @@ func ObserveNodeUpdateAfterAction(f *framework.Framework, nodeName string, nodeP
...
@@ -94,7 +96,7 @@ func ObserveNodeUpdateAfterAction(f *framework.Framework, nodeName string, nodeP
// Returns true if an event matching the predicate was emitted from the system
// Returns true if an event matching the predicate was emitted from the system
// after performing the supplied action.
// after performing the supplied action.
func
ObserveEventAfterAction
(
f
*
framework
.
Framework
,
eventPredicate
func
(
*
v1
.
Event
)
bool
,
action
func
()
error
)
(
bool
,
error
)
{
func
ObserveEventAfterAction
(
f
*
framework
.
Framework
,
eventPredicate
func
(
*
v1
.
Event
)
bool
,
action
Action
)
(
bool
,
error
)
{
observedMatchingEvent
:=
false
observedMatchingEvent
:=
false
informerStartedChan
:=
make
(
chan
struct
{})
informerStartedChan
:=
make
(
chan
struct
{})
var
informerStartedGuard
sync
.
Once
var
informerStartedGuard
sync
.
Once
...
...
test/e2e/scheduling/predicates.go
View file @
2775a52e
This diff is collapsed.
Click to expand it.
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