Merge pull request #10647 from hashicorp/b-fix-nomad-event-endpoint-tests
events: fix event endpoint tests to ignore heartbeats.
This commit is contained in:
commit
b2ef3acff5
|
@ -1,6 +1,7 @@
|
|||
package nomad
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
@ -96,7 +97,7 @@ OUTER:
|
|||
}
|
||||
|
||||
// ignore heartbeat
|
||||
if msg.Event == stream.JsonHeartbeat {
|
||||
if bytes.Equal(msg.Event.Data, stream.JsonHeartbeat.Data) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue