@@ -19,7 +19,6 @@ package exchange
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -27,7 +26,9 @@ import (
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/events"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"github.com/containerd/containerd/protobuf"
|
||||
"github.com/containerd/typeurl"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
)
|
||||
|
||||
func TestExchangeBasic(t *testing.T) {
|
||||
@@ -102,7 +103,7 @@ func TestExchangeBasic(t *testing.T) {
|
||||
break subscribercheck
|
||||
}
|
||||
|
||||
if reflect.DeepEqual(received, testevents) {
|
||||
if cmp.Equal(received, testevents, protobuf.Compare) {
|
||||
// when we do this, we expect the errs channel to be closed and
|
||||
// this will return.
|
||||
subscriber.cancel()
|
||||
@@ -260,7 +261,7 @@ func TestExchangeFilters(t *testing.T) {
|
||||
break subscribercheck
|
||||
}
|
||||
|
||||
if reflect.DeepEqual(received, subscriber.expectEvents) {
|
||||
if cmp.Equal(received, subscriber.expectEvents, protobuf.Compare) {
|
||||
// when we do this, we expect the errs channel to be closed and
|
||||
// this will return.
|
||||
subscriber.cancel()
|
||||
|
||||
Reference in New Issue
Block a user