Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.14
require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.1 // indirect
github.com/cloudevents/sdk-go v1.2.0
github.com/cloudevents/sdk-go/v2 v2.0.0
github.com/cloudevents/sdk-go/v2 v2.0.1-0.20200608152019-2ab697c8fc0b
github.com/ghodss/yaml v1.0.0
github.com/golang/protobuf v1.3.5
github.com/google/go-cmp v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cloudevents/sdk-go v0.0.0-20190509003705-56931988abe3/go.mod h1:j1nZWMLGg3om8SswStBoY6/SHvcLM19MuZqwDtMtmzs=
github.com/cloudevents/sdk-go v1.2.0 h1:2AxI14EJUw1PclJ5gZJtzbxnHIfNMdi76Qq3P3G1BRU=
github.com/cloudevents/sdk-go v1.2.0/go.mod h1:ss+jWJ88wypiewnPEzChSBzTYXGpdcILoN9YHk8uhTQ=
github.com/cloudevents/sdk-go/v2 v2.0.0 h1:AUdGJwaSUnA+VvepKqgjy6XDkPcf0hf/3L7icEs1ibs=
github.com/cloudevents/sdk-go/v2 v2.0.0/go.mod h1:3CTrpB4+u7Iaj6fd7E2Xvm5IxMdRoaAhqaRVnOr2rCU=
github.com/cloudevents/sdk-go/v2 v2.0.1-0.20200608152019-2ab697c8fc0b h1:JuajVVvOdNSXhVlI5Aks9m4+y5i4rM8EOaLhIytotYc=
github.com/cloudevents/sdk-go/v2 v2.0.1-0.20200608152019-2ab697c8fc0b/go.mod h1:3CTrpB4+u7Iaj6fd7E2Xvm5IxMdRoaAhqaRVnOr2rCU=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
Expand Down
3 changes: 2 additions & 1 deletion test/conformance/helpers/broker_tracing_test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

ce "github.com/cloudevents/sdk-go"
ce2 "github.com/cloudevents/sdk-go/v2"
cetest "github.com/cloudevents/sdk-go/v2/test"
"github.com/openzipkin/zipkin-go/model"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
Expand Down Expand Up @@ -82,7 +83,7 @@ func setupBrokerTracing(brokerClass string) SetupInfrastructureFunc {
client *lib.Client,
loggerPodName string,
tc TracingTestCase,
) (tracinghelper.TestSpanTree, lib.EventMatchFunc) {
) (tracinghelper.TestSpanTree, cetest.EventMatcher) {
// Create a configmap used by the broker.
client.CreateBrokerConfigMapOrFail("br", channel)

Expand Down
9 changes: 5 additions & 4 deletions test/conformance/helpers/channel_tracing_test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

ce "github.com/cloudevents/sdk-go"
ce2 "github.com/cloudevents/sdk-go/v2"
cetest "github.com/cloudevents/sdk-go/v2/test"
"github.com/openzipkin/zipkin-go/model"
"go.opentelemetry.io/otel/api/trace"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -46,7 +47,7 @@ type SetupInfrastructureFunc func(
client *lib.Client,
loggerPodName string,
tc TracingTestCase,
) (tracinghelper.TestSpanTree, lib.EventMatchFunc)
) (tracinghelper.TestSpanTree, cetest.EventMatcher)

// TracingTestCase is the test case information for tracing tests.
type TracingTestCase struct {
Expand Down Expand Up @@ -131,13 +132,13 @@ func tracingTest(
// matches mustMatch. It is used to show that the expected event was sent to
// the logger Pod. It returns a list of the matching events.
func assertEventMatch(t *testing.T, client *lib.Client, recorderPodName string,
mustMatch lib.EventMatchFunc) []lib.EventInfo {
mustMatch cetest.EventMatcher) []lib.EventInfo {
targetTracker, err := client.NewEventInfoStore(recorderPodName, t.Logf)
if err != nil {
t.Fatalf("Pod tracker failed: %v", err)
}
defer targetTracker.Cleanup()
matches, err := targetTracker.WaitAtLeastNMatch(lib.ValidEvFunc(mustMatch), 1)
matches, err := targetTracker.WaitAtLeastNMatch(lib.MatchEvent(mustMatch), 1)
if err != nil {
t.Fatalf("Expected messages not found: %v", err)
}
Expand Down Expand Up @@ -172,7 +173,7 @@ func setupChannelTracingWithReply(
client *lib.Client,
loggerPodName string,
tc TracingTestCase,
) (tracinghelper.TestSpanTree, lib.EventMatchFunc) {
) (tracinghelper.TestSpanTree, cetest.EventMatcher) {
// Create the Channels.
channelName := "ch"
client.CreateChannelOrFail(channelName, channel)
Expand Down
Loading