Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Ci race detector test adjustments #1200

Closed
wants to merge 5 commits into from

Conversation

frncmx
Copy link
Contributor

@frncmx frncmx commented Feb 7, 2019

  • couple of context timeout adjustments so tests won't exceed context deadline when running on Travis with -race
  • decreased the node count for TestOverlaySim simulations so that we won't run out of memory on Travis
  • I removed a few unused method parameters

relates to: #741

Ferenc Szabo added 5 commits February 7, 2019 13:29
'chunksize' and 'processors' were unused; I did a cascading delete.
The following test failed with `-race` flag on Travis.

--- FAIL: TestCleanIndex (43.85s)
    ldbstore_test.go:757: context deadline exceeded

As `-race` can increase the run time by 10x.

Alternative: we could just to increase the timeout for the
specific test. As currently the timeout is hardcoded and (strangely)
does not depend on the size of 'n'. That could be achieved by adding
a new function mputWithCustomTimeout(), but then we should keep
symmetry and add custom timeout for mget(), too. But I think the
method already has too many parameters and might be replaced by
the ongoing storage rewrite. So I won't do.
The following test failed with `-race` flag on Travis.

--- FAIL: TestNetworkID (9.04s)
    networkid_test.go:77: Error setting up network: context deadline exceeded

As `-race` can increase the run time by 10x.
TestOverlaySim consistently failed with `-race` flag on Travis. My
assumption was that we hit Travis' memory limitations. After decreasing
the node count the test started to pass.

Note: `-race` may increase memory usage by 5-10x

=== RUN   TestOverlaySim
panic: Could not startup node network for mocker

goroutine 35 [running]:
github.com/ethereum/go-ethereum/p2p/simulations.startStop(0xc0002a7000, 0xc0002a8b40, 0x10)
	/home/travis/gopath/src/github.com/ethereum/go-ethereum/p2p/simulations/mocker.go:66 +0x8a0
created by github.com/ethereum/go-ethereum/p2p/simulations.(*Server).StartMocker
	/home/travis/gopath/src/github.com/ethereum/go-ethereum/p2p/simulations/http.go:348 +0x260
FAIL	github.com/ethereum/go-ethereum/swarm/network/simulations	2.788s
The following test failed with `-race` flag on Travis. As `-race` might
increase the execution time by 2-20x.

--- FAIL: TestFileRetrieval (62.45s)
    snapshot_retrieval_test.go:61: context deadline exceeded
FAIL	github.com/ethereum/go-ethereum/swarm/network/stream	240.794s
@frncmx frncmx changed the title Ci race detector test timeout adjustments Ci race detector test adjustments Feb 7, 2019
@frncmx
Copy link
Contributor Author

frncmx commented Feb 7, 2019

upstream ethereum/go-ethereum#19017

@frncmx frncmx closed this Feb 7, 2019
@acud acud deleted the ci-race-detector-test-timeout-adjustments branch February 11, 2019 03:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants