mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
code review
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user