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

View File

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

View File

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

View File

@ -63,6 +63,9 @@ func TestEthSuite(t *testing.T) {
}
for _, test := range suite.EthTests() {
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)
if result[0].Failed {
t.Fatal()

View File

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