go-ethereum/cmd/swarm
Ferenc Szabo 26b50e3ebe cmd/swarm: fix resource leaks in tests (#19443)
* swarm/api: fix file descriptor leak in NewTestSwarmServer

Swarm storage (localstore) was not closed. That resulted a
"too many open files" error if `TestClientUploadDownloadRawEncrypted`
was run with `-count 1000`.

* cmd/swarm: speed up StartNewNodes() by parallelization

Reduce cluster startup time from 13s to 7s.

* swarm/api: disable flaky TestClientUploadDownloadRawEncrypted with -race

* swarm/storage: disable flaky TestLDBStoreCollectGarbage (-race)

With race detection turned on the disabled cases often fail with:
"ldbstore_test.go:535: expected surplus chunk 150 to be missing, but got no error"

* cmd/swarm: fix process leak in TestACT and TestSwarmUp

Each test run we start 3 nodes, but we did not terminate them. So
those 3 nodes continued eating up 1.2GB (3.4GB with -race) after test
completion.

6b6c4d1c2754f8dd70172ab58d7ee33cf9058c7d changed how we start clusters
to speed up tests. The changeset merged together test cases
and introduced a global cluster. But "forgot" about termination.

Let's get rid of "global cluster" so we have a clear owner of
termination (some time sacrifice), while leaving subtests to use the
same cluster.
2019-04-11 12:44:15 +02:00
..
global-store swarm: mock store listings (#19157) 2019-02-23 10:47:33 +01:00
mimegen cmd/swarm, swarm: cross-platform Content-Type detection (#17782) 2018-10-01 13:39:39 +02:00
swarm-smoke swarm/network: measure time of messages in priority queue (#19250) 2019-03-20 21:30:34 +01:00
swarm-snapshot swarm/network: WIP consider all nodes for healthy iteration (#19155) 2019-02-28 08:12:50 +01:00
access_test.go cmd/swarm: fix resource leaks in tests (#19443) 2019-04-11 12:44:15 +02:00
access.go cmd: prefer nil slices over zero-length slices (#19077) 2019-02-15 01:02:11 +02:00
bootnodes.go swarm: bootnode-mode, new bootnodes and no p2p package discovery (#18498) 2019-01-24 12:02:18 +01:00
config_test.go cmd,swarm: enforce camel case variable names (#19060) 2019-02-24 12:39:23 +01:00
config.go cmd/swarm, p2p, swarm: Enable ENR in binary/execadapter (#19309) 2019-03-22 05:55:47 +01:00
db.go cmd/swarm: split flags and cli command declarations to the relevant files (#17896) 2018-10-12 14:51:38 +02:00
download.go cmd/swarm: split flags and cli command declarations to the relevant files (#17896) 2018-10-12 14:51:38 +02:00
explore.go cmd/swarm: hashes command (#19008) 2019-02-07 13:51:24 +01:00
export_test.go cmd/swarm: speed up tests - use global cluster (#18129) 2018-11-19 14:57:22 +01:00
feeds_test.go cmd/swarm: update should error on manifest mismatch (#18047) 2018-11-26 17:37:59 +01:00
feeds.go cmd/swarm: update should error on manifest mismatch (#18047) 2018-11-26 17:37:59 +01:00
flags.go cmd/swarm/swarm-smoke: sliding window test should not time out (#19152) 2019-03-05 17:43:05 +01:00
fs_test.go cmd/swarm: FUSE do not require --ipcpath (#18112) 2018-11-23 01:32:34 +01:00
fs.go cmd: prefer nil slices over zero-length slices (#19077) 2019-02-15 01:02:11 +02:00
hash.go contracts, swarm: implement EIP-1577 (#19285) 2019-03-20 09:33:24 +01:00
list.go cmd/swarm: split flags and cli command declarations to the relevant files (#17896) 2018-10-12 14:51:38 +02:00
main.go cmd/swarm, p2p, swarm: Enable ENR in binary/execadapter (#19309) 2019-03-22 05:55:47 +01:00
manifest_test.go cmd/swarm, swarm/api/http, swarm/bmt, swarm/fuse, swarm/network/stream, swarm/storage, swarm/storage/encryption, swarm/testutil: use pseudo-random instead of crypto-random for test files content generation (#18083) 2018-11-14 09:21:14 +01:00
manifest.go cmd/swarm: split flags and cli command declarations to the relevant files (#17896) 2018-10-12 14:51:38 +02:00
run_test.go cmd/swarm: fix resource leaks in tests (#19443) 2019-04-11 12:44:15 +02:00
upload_test.go cmd/swarm: fix resource leaks in tests (#19443) 2019-04-11 12:44:15 +02:00
upload.go cmd,swarm: enforce camel case variable names (#19060) 2019-02-24 12:39:23 +01:00