From 3402f2539f3f27f6aa686b728d01e303d8d86ae2 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 6 Jun 2018 14:52:26 -0700 Subject: [PATCH] code review --- api/nodes.go | 2 +- command/node_drain_test.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) 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)