diff --git a/api/nodes.go b/api/nodes.go index a07480b88..6184f6cd7 100644 --- a/api/nodes.go +++ b/api/nodes.go @@ -179,7 +179,7 @@ func (n *Nodes) monitorDrainMultiplex(ctx context.Context, cancel func(), case <-ctx.Done(): // If we are exiting but we have a message, attempt to send it - // so we don't loose a message but do not block. + // so we don't lose a message but do not block. select { case outCh <- msg: default: diff --git a/command/node_drain_test.go b/command/node_drain_test.go index 5fb9c6805..793cc47aa 100644 --- a/command/node_drain_test.go +++ b/command/node_drain_test.go @@ -267,7 +267,6 @@ func TestNodeDrainCommand_Monitor_NoDrainStrategy(t *testing.T) { defer server.Shutdown() // Wait for a node to appear - var nodeID string testutil.WaitForResult(func() (bool, error) { nodes, _, err := client.Nodes().List(nil) if err != nil { @@ -276,7 +275,6 @@ func TestNodeDrainCommand_Monitor_NoDrainStrategy(t *testing.T) { if len(nodes) == 0 { return false, fmt.Errorf("missing node") } - nodeID = nodes[0].ID return true, nil }, func(err error) { t.Fatalf("err: %s", err)