Skip to content

Commit

Permalink
Merge pull request #10647 from hashicorp/b-fix-nomad-event-endpoint-t…
Browse files Browse the repository at this point in the history
…ests

events: fix event endpoint tests to ignore heartbeats.
  • Loading branch information
jrasell authored and Mahmood Ali committed Jun 9, 2021
1 parent 8b5b4c8 commit 029953d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nomad/event_endpoint_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nomad

import (
"bytes"
"context"
"encoding/json"
"fmt"
Expand Down Expand Up @@ -96,7 +97,7 @@ OUTER:
}

// ignore heartbeat
if msg.Event == stream.JsonHeartbeat {
if bytes.Equal(msg.Event.Data, stream.JsonHeartbeat.Data) {
continue
}

Expand Down Expand Up @@ -283,7 +284,7 @@ OUTER:
t.Fatalf("Got error: %v", msg.Error.Error())
}

if msg.Event == stream.JsonHeartbeat {
if bytes.Equal(msg.Event.Data, stream.JsonHeartbeat.Data) {
continue
}

Expand Down

0 comments on commit 029953d

Please sign in to comment.