From 18ea112835c12a56c0eec0124aa610f74d39f1da Mon Sep 17 00:00:00 2001 From: Hugo Aguirre Date: Fri, 10 Jan 2025 15:01:21 -0600 Subject: [PATCH 1/4] fix(go): Fix TestTracingAction test case --- go/core/action_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/core/action_test.go b/go/core/action_test.go index 5bf24b5a0..2acaccadc 100644 --- a/go/core/action_test.go +++ b/go/core/action_test.go @@ -116,7 +116,7 @@ func TestActionTracing(t *testing.T) { } tc := tracing.NewTestOnlyTelemetryClient() r.TracingState().WriteTelemetryImmediate(tc) - const actionName = "TestTracing-inc" + const actionName = "test/TestTracing-inc" a := defineAction(r, "test", actionName, atype.Custom, nil, nil, inc) if _, err := a.Run(context.Background(), 3, nil); err != nil { t.Fatal(err) From 47f86000cdaf93e9483882def943465f6bddf60d Mon Sep 17 00:00:00 2001 From: Hugo Aguirre Date: Fri, 10 Jan 2025 15:12:11 -0600 Subject: [PATCH 2/4] concatenate provider and action name during evaluation --- go/core/action_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/go/core/action_test.go b/go/core/action_test.go index 2acaccadc..4ec875a9e 100644 --- a/go/core/action_test.go +++ b/go/core/action_test.go @@ -114,17 +114,19 @@ func TestActionTracing(t *testing.T) { if err != nil { t.Fatal(err) } + provider := "test" tc := tracing.NewTestOnlyTelemetryClient() r.TracingState().WriteTelemetryImmediate(tc) - const actionName = "test/TestTracing-inc" - a := defineAction(r, "test", actionName, atype.Custom, nil, nil, inc) + const actionName = "TestTracing-inc" + a := defineAction(r, provider, actionName, atype.Custom, nil, nil, inc) if _, err := a.Run(context.Background(), 3, nil); err != nil { t.Fatal(err) } // The same trace store is used for all tests, so there might be several traces. // Look for this one, which has a unique name. + fullActionName := provider + test for _, td := range tc.Traces { - if td.DisplayName == actionName { + if td.DisplayName == fullActionName { // Spot check: expect a single span. if g, w := len(td.Spans), 1; g != w { t.Errorf("got %d spans, want %d", g, w) From 000a877bad607938718e38a4869f19821d47e081 Mon Sep 17 00:00:00 2001 From: Hugo Aguirre Date: Fri, 10 Jan 2025 15:15:06 -0600 Subject: [PATCH 3/4] oops, wrong variable name --- go/core/action_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/core/action_test.go b/go/core/action_test.go index 4ec875a9e..076544495 100644 --- a/go/core/action_test.go +++ b/go/core/action_test.go @@ -124,7 +124,7 @@ func TestActionTracing(t *testing.T) { } // The same trace store is used for all tests, so there might be several traces. // Look for this one, which has a unique name. - fullActionName := provider + test + fullActionName := provider + actionName for _, td := range tc.Traces { if td.DisplayName == fullActionName { // Spot check: expect a single span. From 270ce26cd91a0a7aa778763354441b41816ae234 Mon Sep 17 00:00:00 2001 From: Hugo Aguirre Date: Fri, 10 Jan 2025 15:20:37 -0600 Subject: [PATCH 4/4] add forward slash to fullActionName --- go/core/action_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/core/action_test.go b/go/core/action_test.go index 076544495..0c4451d06 100644 --- a/go/core/action_test.go +++ b/go/core/action_test.go @@ -124,7 +124,7 @@ func TestActionTracing(t *testing.T) { } // The same trace store is used for all tests, so there might be several traces. // Look for this one, which has a unique name. - fullActionName := provider + actionName + fullActionName := provider + '/' + actionName for _, td := range tc.Traces { if td.DisplayName == fullActionName { // Spot check: expect a single span.