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.
This commit is contained in:
Sina Mahmoodi 2024-01-12 17:44:03 +03:30 committed by GitHub
parent 43ba7d65a8
commit a608c0ac84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

@ -17,7 +17,7 @@ jobs:
with: with:
go-version: 1.21.4 go-version: 1.21.4
- name: Run tests - name: Run tests
run: go test ./... run: go test -short ./...
env: env:
GOOS: linux GOOS: linux
GOARCH: 386 GOARCH: 386

@ -76,9 +76,9 @@ func (s *Suite) EthTests() []utesting.Test {
{Name: "TestMaliciousHandshake", Fn: s.TestMaliciousHandshake}, {Name: "TestMaliciousHandshake", Fn: s.TestMaliciousHandshake},
{Name: "TestMaliciousStatus", Fn: s.TestMaliciousStatus}, {Name: "TestMaliciousStatus", Fn: s.TestMaliciousStatus},
// test transactions // test transactions
{Name: "TestLargeTxRequest", Fn: s.TestLargeTxRequest, Slow: true},
{Name: "TestTransaction", Fn: s.TestTransaction}, {Name: "TestTransaction", Fn: s.TestTransaction},
{Name: "TestInvalidTxs", Fn: s.TestInvalidTxs}, {Name: "TestInvalidTxs", Fn: s.TestInvalidTxs},
{Name: "TestLargeTxRequest", Fn: s.TestLargeTxRequest},
{Name: "TestNewPooledTxs", Fn: s.TestNewPooledTxs}, {Name: "TestNewPooledTxs", Fn: s.TestNewPooledTxs},
{Name: "TestBlobViolations", Fn: s.TestBlobViolations}, {Name: "TestBlobViolations", Fn: s.TestBlobViolations},
} }

@ -63,6 +63,9 @@ func TestEthSuite(t *testing.T) {
} }
for _, test := range suite.EthTests() { for _, test := range suite.EthTests() {
t.Run(test.Name, func(t *testing.T) { t.Run(test.Name, func(t *testing.T) {
if test.Slow && testing.Short() {
t.Skipf("%s: skipping in -short mode", test.Name)
}
result := utesting.RunTests([]utesting.Test{{Name: test.Name, Fn: test.Fn}}, os.Stdout) result := utesting.RunTests([]utesting.Test{{Name: test.Name, Fn: test.Fn}}, os.Stdout)
if result[0].Failed { if result[0].Failed {
t.Fatal() t.Fatal()

@ -35,6 +35,7 @@ import (
type Test struct { type Test struct {
Name string Name string
Fn func(*T) Fn func(*T)
Slow bool
} }
// Result is the result of a test execution. // Result is the result of a test execution.