Skip to content

Commit 5106f55

Browse files
committed
chore: address PR feedback
1 parent 6e22437 commit 5106f55

2 files changed

Lines changed: 10 additions & 16 deletions

File tree

test/e2e/evm_spamoor_smoke_test.go

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestSpamoorSmoke(t *testing.T) {
6161
t.Log("Sequencer node is up")
6262

6363
// Start Spamoor within the same Docker network, targeting reth internal RPC.
64-
ni, err := env.RethNode.GetNetworkInfo(context.Background())
64+
ni, err := env.RethNode.GetNetworkInfo(ctx)
6565
require.NoError(t, err, "failed to get network info")
6666

6767
internalRPC := "http://" + ni.Internal.RPCAddress()
@@ -78,7 +78,6 @@ func TestSpamoorSmoke(t *testing.T) {
7878
WithRPCHosts(internalRPC).
7979
WithPrivateKey(TestPrivateKey)
8080

81-
ctx = t.Context()
8281
spNode, err := spBuilder.Build(ctx)
8382
require.NoError(t, err, "failed to build sp node")
8483

@@ -136,7 +135,8 @@ func TestSpamoorSmoke(t *testing.T) {
136135
t.Cleanup(func() { _ = api.DeleteSpammer(idToDelete) })
137136
}
138137

139-
// Allow additional time to accumulate activity.
138+
// allow spamoor enough time to generate transaction throughput
139+
// so that the expected tracing spans appear in Jaeger.
140140
time.Sleep(60 * time.Second)
141141

142142
// Fetch parsed metrics and print a concise summary.
@@ -154,6 +154,7 @@ func TestSpamoorSmoke(t *testing.T) {
154154
var peerCountHex string
155155
require.NoError(t, rpcCli.CallContext(ctx, &peerCountHex, "net_peerCount"))
156156
t.Logf("reth head: %d -> %d, net_peerCount=%s", h1, h2, strings.TrimSpace(peerCountHex))
157+
require.Greater(t, h2, h1, "reth head should have advanced")
157158

158159
// Verify Jaeger received traces from ev-node.
159160
// Service name is set above via --evnode.instrumentation.tracing_service_name "ev-node-smoke".
@@ -207,18 +208,9 @@ func TestSpamoorSmoke(t *testing.T) {
207208
require.Contains(t, opNames, name, "expected span %q not found in ev-node-smoke traces", name)
208209
}
209210

210-
// assert expected ev-reth span names are present.
211-
expectedRethSpans := []string{
212-
"Storage trie",
213-
"cache_for",
214-
}
215-
rethOpNames := make(map[string]struct{}, len(evRethSpans))
216-
for _, s := range evRethSpans {
217-
rethOpNames[s.operationName] = struct{}{}
218-
}
219-
for _, name := range expectedRethSpans {
220-
require.Contains(t, rethOpNames, name, "expected span %q not found in ev-reth traces", name)
221-
}
211+
// ev-reth span names are internal to the Rust OTLP exporter and may change
212+
// across versions, so we only assert that spans were collected at all.
213+
require.NotEmpty(t, evRethSpans, "expected at least one span from ev-reth")
222214

223215
require.Greater(t, sent, float64(0), "at least one transaction should have been sent")
224216
require.Zero(t, fail, "no transactions should have failed")

test/e2e/evm_test_common.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ func setupFullNode(t testing.TB, sut *SystemUnderTest, fullNodeHome, sequencerHo
466466
}
467467

468468
// Global nonce counter to ensure unique nonces across multiple transaction submissions
469-
var globalNonce uint64 = 0
469+
var globalNonce uint64
470470

471471
// submitTransactionAndGetBlockNumber submits a transaction to the sequencer and returns inclusion details.
472472
// This function:
@@ -593,6 +593,7 @@ func setupCommonEVMEnv(t testing.TB, sut *SystemUnderTest, client tastoratypes.T
593593
GenesisHash: genesisHash,
594594
Endpoints: dynEndpoints,
595595
RethNode: rethNode,
596+
FullNode: rethFn,
596597
}
597598
}
598599

@@ -605,6 +606,7 @@ type EVMEnv struct {
605606
GenesisHash string
606607
Endpoints *TestEndpoints
607608
RethNode *reth.Node
609+
FullNode *reth.Node
608610
}
609611

610612
// checkBlockInfoAt retrieves block information at a specific height including state root.

0 commit comments

Comments
 (0)