-
Notifications
You must be signed in to change notification settings - Fork 618
Open
Description
eventing/test/conformance/helpers/tracing_test_helper.go
Lines 59 to 92 in 71a6c9f
| // TODO - redo with OTel | |
| // Start the event info store. Note this is done _before_ we setup the infrastructure, which | |
| // sends the event. | |
| // targetTracker, err := recordevents.NewEventInfoStore(client, recordEventsPodName, client.Namespace) | |
| // if err != nil { | |
| // t.Fatal("Pod tracker failed:", err) | |
| // } | |
| // Setup the test infrastructure | |
| // expectedTestSpan, eventMatcher := setupInfrastructure(ctx, t, &channel, client, recordEventsPodName, true) | |
| // Assert that the event was seen. | |
| // matches := targetTracker.AssertAtLeast(1, recordevents.MatchEvent(eventMatcher)) | |
| // Match the trace | |
| // traceID := getTraceIDHeader(t, matches) | |
| // trace, err := zipkin.JSONTracePred(traceID, 5*time.Minute, func(trace []model.SpanModel) bool { | |
| // tree, err := tracinghelper.GetTraceTree(trace) | |
| // if err != nil { | |
| // return false | |
| // } | |
| // // Do not pass t to prevent unnecessary log output. | |
| // return len(expectedTestSpan.MatchesSubtree(nil, tree)) > 0 | |
| // }) | |
| // if err != nil { | |
| // t.Logf("Unable to get trace %q: %v. Trace so far %+v", traceID, err, tracinghelper.PrettyPrintTrace(trace)) | |
| // tree, err := tracinghelper.GetTraceTree(trace) | |
| // if err != nil { | |
| // t.Fatal(err) | |
| // } | |
| // if len(expectedTestSpan.MatchesSubtree(t, tree)) == 0 { | |
| // t.Fatalf("No matching subtree. want: %v got: %v", expectedTestSpan, tree) | |
| // } | |
| // } |
tracingTest helper needs to be redone with OTel. Currently, the old code, that used Zipkin, is commented, but that triggers unused linting error.
Error: test/conformance/helpers/tracing_test_helper.go:53:3: const recordEventsPodName is unused (unused)
recordEventsPodName = "recordevents"
^
Error: test/conformance/helpers/tracing_test_helper.go:98:6: func getTraceIDHeader is unused (unused)
func getTraceIDHeader(t *testing.T, evInfos []recordevents.EventInfo) string {
^
I'll remove commented code in #8851, so this is to track TODO and keep a reference to the old code.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog