go-ethereum/swarm/storage
Ferenc Szabo e38b227ce6 Ci race detector handle failing tests (#19143)
* swarm/storage: increase mget timeout in common_test.go

 TestDbStoreCorrect_1k sometimes timed out with -race on Travis.

--- FAIL: TestDbStoreCorrect_1k (24.63s)
    common_test.go:194: testStore failed: timed out after 10s

* swarm: remove unused vars from TestSnapshotSyncWithServer

nodeCount and chunkCount is returned from setupSim and those values
we use.

* swarm: move race/norace helpers from stream to testutil

As we will need to use the flag in other packages, too.

* swarm: refactor TestSwarmNetwork case

Extract long running test cases for better visibility.

* swarm/network: skip TestSyncingViaGlobalSync with -race

As panics on Travis.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7e351b]

* swarm: run TestSwarmNetwork with fewer nodes with -race

As otherwise we always get test failure with `network_test.go:374:
context deadline exceeded` even with raised `Timeout`.

* swarm/network: run TestDeliveryFromNodes with fewer nodes with -race

Test on Travis times out with 8 or more nodes if -race flag is present.

* swarm/network: smaller node count for discovery tests with -race

TestDiscoveryPersistenceSimulationSimAdapters failed on Travis with
`-race` flag present. The failure was due to extensive memory usage,
coming from the CGO runtime. Using a smaller node count resolves the
issue.

=== RUN   TestDiscoveryPersistenceSimulationSimAdapter
==7227==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
FATAL: ThreadSanitizer CHECK failed: ./gotsan.cc:6976 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
FAIL    github.com/ethereum/go-ethereum/swarm/network/simulations/discovery     804.826s

* swarm/network: run TestFileRetrieval with fewer nodes with -race

Otherwise we get a failure due to extensive memory usage, as the CGO
runtime cannot allocate more bytes.

=== RUN   TestFileRetrieval
==7366==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
FATAL: ThreadSanitizer CHECK failed: ./gotsan.cc:6976 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)
FAIL	github.com/ethereum/go-ethereum/swarm/network/stream	155.165s

* swarm/network: run TestRetrieval with fewer nodes with -race

Otherwise we get a failure due to extensive memory usage, as the CGO
runtime cannot allocate more bytes ("ThreadSanitizer failed to
allocate").

* swarm/network: skip flaky TestGetSubscriptionsRPC on Travis w/ -race

Test fails a lot with something like:
 streamer_test.go:1332: Real subscriptions and expected amount don't match; real: 0, expected: 20

* swarm/storage: skip TestDB_SubscribePull* tests on Travis w/ -race

Travis just hangs...

ok  	github.com/ethereum/go-ethereum/swarm/storage/feed/lookup	1.307s
keepalive
keepalive
keepalive

or panics after a while.

Without these tests the race detector job is now stable. Let's
invetigate these tests in a separate issue:
https://github.com/ethersphere/go-ethereum/issues/1245
2019-02-20 22:57:42 +01:00
..
encryption vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
feed swarm/network, swarm/storage: Preserve opentracing contexts (#19022) 2019-02-08 16:57:48 +01:00
localstore Ci race detector handle failing tests (#19143) 2019-02-20 22:57:42 +01:00
mock swarm/storage/mock/test: fix T.Fatal inside a goroutine (#18399) 2019-01-07 14:32:01 +01:00
chunker_test.go vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
chunker.go swarm/network, swarm/storage: Preserve opentracing contexts (#19022) 2019-02-08 16:57:48 +01:00
common_test.go Ci race detector handle failing tests (#19143) 2019-02-20 22:57:42 +01:00
database.go swarm: remove unused/dead code (#18351) 2018-12-23 17:31:32 +01:00
error.go swarm: remove unused/dead code (#18351) 2018-12-23 17:31:32 +01:00
filestore_test.go cmd/swarm: hashes command (#19008) 2019-02-07 13:51:24 +01:00
filestore.go swarm/storage: fix HashExplore concurrency bug ethersphere#1211 (#19028) 2019-02-13 00:17:44 +01:00
hasherstore_test.go swarm: Chunk refactor (#17659) 2018-09-13 11:42:19 +02:00
hasherstore.go vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
ldbstore_test.go swarm: CI race detector test adjustments (#19017) 2019-02-08 17:07:11 +01:00
ldbstore.go swarm/storage: fix influxdb gc metrics report (#19102) 2019-02-15 07:41:42 +01:00
localstore_test.go swarm: Debug API and HasChunks() API endpoint (#18980) 2019-02-07 15:49:19 +01:00
localstore.go swarm: Debug API and HasChunks() API endpoint (#18980) 2019-02-07 15:49:19 +01:00
memstore_test.go swarm: CI race detector test adjustments (#19017) 2019-02-08 17:07:11 +01:00
memstore.go swarm: Debug API and HasChunks() API endpoint (#18980) 2019-02-07 15:49:19 +01:00
netstore_test.go swarm/network, swarm/storage: Preserve opentracing contexts (#19022) 2019-02-08 16:57:48 +01:00
netstore.go swarm/network: Keep span across roundtrip (#19140) 2019-02-20 14:50:37 +01:00
pyramid.go swarm: bootnode-mode, new bootnodes and no p2p package discovery (#18498) 2019-01-24 12:02:18 +01:00
schema.go swarm/storage: fix garbage collector index skew (#18080) 2018-11-13 15:22:53 +01:00
swarmhasher.go swarm: network rewrite merge 2018-06-21 21:10:31 +02:00
types_test.go swarm/storage: change Proximity function and add TestProximity test (#18379) 2019-01-03 06:17:59 +01:00
types.go swarm: Debug API and HasChunks() API endpoint (#18980) 2019-02-07 15:49:19 +01:00