Skip to content

Commit

Permalink
update callers in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed May 22, 2019
1 parent c702353 commit 40b0c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nomad/drainer/watch_nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestNodeDrainWatcher_Remove(t *testing.T) {
require.Equal(n, tracked[n.ID])

// Change the node to be not draining and wait for it to be untracked
require.Nil(state.UpdateNodeDrain(101, n.ID, nil, false, nil))
require.Nil(state.UpdateNodeDrain(101, n.ID, nil, false, 0, nil))
testutil.WaitForResult(func() (bool, error) {
return len(m.Events) == 2, nil
}, func(err error) {
Expand Down Expand Up @@ -166,7 +166,7 @@ func TestNodeDrainWatcher_Update(t *testing.T) {
// Change the node to have a new spec
s2 := n.DrainStrategy.Copy()
s2.Deadline += time.Hour
require.Nil(state.UpdateNodeDrain(101, n.ID, s2, false, nil))
require.Nil(state.UpdateNodeDrain(101, n.ID, s2, false, 0, nil))

// Wait for it to be updated
testutil.WaitForResult(func() (bool, error) {
Expand Down
4 changes: 2 additions & 2 deletions nomad/node_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2662,7 +2662,7 @@ func TestClientEndpoint_ListNodes_Blocking(t *testing.T) {
Deadline: 10 * time.Second,
},
}
errCh <- state.UpdateNodeDrain(3, node.ID, s, false, nil)
errCh <- state.UpdateNodeDrain(3, node.ID, s, false, 0, nil)
})

req.MinQueryIndex = 2
Expand All @@ -2688,7 +2688,7 @@ func TestClientEndpoint_ListNodes_Blocking(t *testing.T) {

// Node status update triggers watches
time.AfterFunc(100*time.Millisecond, func() {
errCh <- state.UpdateNodeStatus(40, node.ID, structs.NodeStatusDown, nil)
errCh <- state.UpdateNodeStatus(40, node.ID, structs.NodeStatusDown, 0, nil)
})

req.MinQueryIndex = 38
Expand Down

0 comments on commit 40b0c64

Please sign in to comment.