Skip to content

Commit

Permalink
cmd: increase testpeers tests timeouts (#3268)
Browse files Browse the repository at this point in the history
Fixing flaky test in previous PR #3267 revealed another issue. Fixing that one, which is purely unit test related.

category: test
ticket: none
  • Loading branch information
KaloyanTanev authored Sep 10, 2024
1 parent 74b688a commit 6b9ba4d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmd/testpeers_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestPeersTest(t *testing.T) {
OutputToml: "",
Quiet: true,
TestCases: nil,
Timeout: time.Second,
Timeout: 3 * time.Second,
},
ENRs: []string{
"enr:-HW4QBHlcyD3fYWUMADiOv4OxODaL5wJG0a7P7d_ltu4VZe1MibZ1N-twFaoaq0BoCtXcY71etxLJGeEZT5p3XCO6GOAgmlkgnY0iXNlY3AyNTZrMaEDI2HRUlVBag__njkOWEEQRLlC9ylIVCrIXOuNBSlrx6o",
Expand Down Expand Up @@ -188,7 +188,7 @@ func TestPeersTest(t *testing.T) {
OutputToml: "",
Quiet: false,
TestCases: []string{"ping"},
Timeout: time.Second,
Timeout: 200 * time.Millisecond,
},
ENRs: []string{
"enr:-HW4QBHlcyD3fYWUMADiOv4OxODaL5wJG0a7P7d_ltu4VZe1MibZ1N-twFaoaq0BoCtXcY71etxLJGeEZT5p3XCO6GOAgmlkgnY0iXNlY3AyNTZrMaEDI2HRUlVBag__njkOWEEQRLlC9ylIVCrIXOuNBSlrx6o",
Expand Down Expand Up @@ -224,7 +224,7 @@ func TestPeersTest(t *testing.T) {
testConfig: testConfig{
OutputToml: "./write-to-file-test.toml.tmp",
Quiet: false,
Timeout: 500 * time.Millisecond,
Timeout: 3 * time.Second,
},
ENRs: []string{
"enr:-HW4QBHlcyD3fYWUMADiOv4OxODaL5wJG0a7P7d_ltu4VZe1MibZ1N-twFaoaq0BoCtXcY71etxLJGeEZT5p3XCO6GOAgmlkgnY0iXNlY3AyNTZrMaEDI2HRUlVBag__njkOWEEQRLlC9ylIVCrIXOuNBSlrx6o",
Expand All @@ -241,10 +241,11 @@ func TestPeersTest(t *testing.T) {
CategoryName: peersTestCategory,
Targets: map[string][]testResult{
"self": {
{Name: "libp2pTCPPortOpenTest", Verdict: testVerdictFail, Measurement: "", Suggestion: "", Error: errTimeoutInterrupted},
{Name: "libp2pTCPPortOpenTest", Verdict: testVerdictOk, Measurement: "", Suggestion: "", Error: testResultError{}},
},
fmt.Sprintf("relay %v", relayAddr): {
{Name: "pingRelay", Verdict: testVerdictFail, Measurement: "", Suggestion: "", Error: errTimeoutInterrupted},
{Name: "pingRelay", Verdict: testVerdictOk, Measurement: "", Suggestion: "", Error: testResultError{}},
{Name: "pingMeasureRelay", Verdict: testVerdictGood, Measurement: "", Suggestion: "", Error: testResultError{}},
},
"peer inexpensive-farm enr:-HW4QBHlcyD3fYWUMADiOv4OxODaL5wJG0a7P7d_ltu4VZe1MibZ1N-twFaoaq0BoCtXcY71etxLJGeEZT5p3XCO6GOAgmlkgnY0iXNlY3AyNTZrMaEDI2HRUlVBag__njkOWEEQRLlC9ylIVCrIXOuNBSlrx6o": {
{Name: "ping", Verdict: testVerdictFail, Measurement: "", Suggestion: "", Error: errTimeoutInterrupted},
Expand Down

0 comments on commit 6b9ba4d

Please sign in to comment.