Skip to content

Commit a608c0a

Browse files
authored
cmd/devp2p/internal/ethtest: skip large tx test on github build (#28794)
This test was failling consistently on the github 32-bit build probably due to slow IO. Skipping it for that green check.
1 parent 43ba7d6 commit a608c0a

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
go-version: 1.21.4
1919
- name: Run tests
20-
run: go test ./...
20+
run: go test -short ./...
2121
env:
2222
GOOS: linux
2323
GOARCH: 386

cmd/devp2p/internal/ethtest/suite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ func (s *Suite) EthTests() []utesting.Test {
7676
{Name: "TestMaliciousHandshake", Fn: s.TestMaliciousHandshake},
7777
{Name: "TestMaliciousStatus", Fn: s.TestMaliciousStatus},
7878
// test transactions
79+
{Name: "TestLargeTxRequest", Fn: s.TestLargeTxRequest, Slow: true},
7980
{Name: "TestTransaction", Fn: s.TestTransaction},
8081
{Name: "TestInvalidTxs", Fn: s.TestInvalidTxs},
81-
{Name: "TestLargeTxRequest", Fn: s.TestLargeTxRequest},
8282
{Name: "TestNewPooledTxs", Fn: s.TestNewPooledTxs},
8383
{Name: "TestBlobViolations", Fn: s.TestBlobViolations},
8484
}

cmd/devp2p/internal/ethtest/suite_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ func TestEthSuite(t *testing.T) {
6363
}
6464
for _, test := range suite.EthTests() {
6565
t.Run(test.Name, func(t *testing.T) {
66+
if test.Slow && testing.Short() {
67+
t.Skipf("%s: skipping in -short mode", test.Name)
68+
}
6669
result := utesting.RunTests([]utesting.Test{{Name: test.Name, Fn: test.Fn}}, os.Stdout)
6770
if result[0].Failed {
6871
t.Fatal()

internal/utesting/utesting.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
type Test struct {
3636
Name string
3737
Fn func(*T)
38+
Slow bool
3839
}
3940

4041
// Result is the result of a test execution.

0 commit comments

Comments
 (0)