Skip to content

Commit 4c7b7e1

Browse files
committed
chore: remove span assertions
1 parent f4949a1 commit 4c7b7e1

3 files changed

Lines changed: 1 addition & 57 deletions

File tree

test/e2e/benchmark/spamoor_erc20_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,6 @@ func (s *SpamoorSuite) TestERC20Throughput() {
100100
w.addEntries(summary.entries("ERC20Throughput"))
101101
w.addSpans(traces.allSpans())
102102

103-
// assertions
104103
s.Require().Greater(sent, float64(0), "at least one transaction should have been sent")
105104
s.Require().Zero(failed, "no transactions should have failed")
106-
107-
// assert expected ev-node spans are present
108-
assertSpanNames(t, traces.evNode, []string{
109-
"BlockExecutor.ProduceBlock",
110-
"BlockExecutor.ApplyBlock",
111-
"Executor.ExecuteTxs",
112-
"Executor.SetFinal",
113-
"Engine.ForkchoiceUpdated",
114-
"Engine.NewPayload",
115-
"Engine.GetPayload",
116-
"Sequencer.GetNextBatch",
117-
"DA.Submit",
118-
}, serviceName)
119105
}

test/e2e/benchmark/spamoor_smoke_test.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -79,34 +79,6 @@ func (s *SpamoorSuite) TestSpamoorSmoke() {
7979
traces := s.collectTraces(e, "ev-node-smoke")
8080
w.addSpans(traces.allSpans())
8181

82-
// assert expected ev-node span names
83-
assertSpanNames(t, traces.evNode, []string{
84-
"BlockExecutor.ProduceBlock",
85-
"BlockExecutor.ApplyBlock",
86-
"BlockExecutor.CreateBlock",
87-
"BlockExecutor.RetrieveBatch",
88-
"Executor.ExecuteTxs",
89-
"Executor.SetFinal",
90-
"Engine.ForkchoiceUpdated",
91-
"Engine.NewPayload",
92-
"Engine.GetPayload",
93-
"Eth.GetBlockByNumber",
94-
"Sequencer.GetNextBatch",
95-
"DASubmitter.SubmitHeaders",
96-
"DASubmitter.SubmitData",
97-
"DA.Submit",
98-
}, "ev-node-smoke")
99-
100-
// assert expected ev-reth span names when traces are available
101-
if len(traces.evReth) > 0 {
102-
assertSpanNames(t, traces.evReth, []string{
103-
"build_payload",
104-
"execute_tx",
105-
"try_build",
106-
"validate_transaction",
107-
}, "ev-reth")
108-
}
109-
11082
s.Require().Greater(sent, float64(0), "at least one transaction should have been sent")
11183
s.Require().Zero(fail, "no transactions should have failed")
11284
}

test/e2e/benchmark/traces.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
package benchmark
44

55
import (
6-
"testing"
76
"time"
87

98
e2e "github.com/evstack/ev-node/test/e2e"
10-
"github.com/stretchr/testify/require"
119
)
1210

1311
// jaegerSpan holds the fields we extract from Jaeger's untyped JSON response.
@@ -16,7 +14,7 @@ type jaegerSpan struct {
1614
duration float64 // microseconds
1715
}
1816

19-
func (j jaegerSpan) SpanName() string { return j.operationName }
17+
func (j jaegerSpan) SpanName() string { return j.operationName }
2018
func (j jaegerSpan) SpanDuration() time.Duration { return time.Duration(j.duration) * time.Microsecond }
2119

2220
// extractSpansFromTraces walks Jaeger's []any response and pulls out span operation names and durations.
@@ -53,15 +51,3 @@ func toTraceSpans(spans []jaegerSpan) []e2e.TraceSpan {
5351
}
5452
return out
5553
}
56-
57-
// assertSpanNames verifies that all expected span names appear in the trace data.
58-
func assertSpanNames(t testing.TB, spans []e2e.TraceSpan, expected []string, label string) {
59-
t.Helper()
60-
opNames := make(map[string]struct{}, len(spans))
61-
for _, span := range spans {
62-
opNames[span.SpanName()] = struct{}{}
63-
}
64-
for _, name := range expected {
65-
require.Contains(t, opNames, name, "expected span %q not found in %s traces", name, label)
66-
}
67-
}

0 commit comments

Comments
 (0)