aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/simulation/http_test.go
diff options
context:
space:
mode:
authorholisticode <holistic.computing@gmail.com>2018-07-31 04:55:25 +0800
committerBalint Gabor <balint.g@gmail.com>2018-07-31 04:55:25 +0800
commitd6efa691872efb723ea3177a92da9e9b31c34eba (patch)
tree9c7e85c9cab9a2cf1240db47a8de44162f69353e /swarm/network/simulation/http_test.go
parent3ea8ac6a9ab9e56164707119e9142f06fae4c316 (diff)
downloaddexon-d6efa691872efb723ea3177a92da9e9b31c34eba.tar
dexon-d6efa691872efb723ea3177a92da9e9b31c34eba.tar.gz
dexon-d6efa691872efb723ea3177a92da9e9b31c34eba.tar.bz2
dexon-d6efa691872efb723ea3177a92da9e9b31c34eba.tar.lz
dexon-d6efa691872efb723ea3177a92da9e9b31c34eba.tar.xz
dexon-d6efa691872efb723ea3177a92da9e9b31c34eba.tar.zst
dexon-d6efa691872efb723ea3177a92da9e9b31c34eba.zip
Merge netsim mig to master (#17241)
* swarm: merged stream-tests migration to develop * swarm/network: expose simulation RandomUpNode to use in stream tests * swarm/network: wait for subs in PeerEvents and fix stream.runSyncTest * swarm: enforce waitkademlia for snapshot tests * swarm: fixed syncer tests and snapshot_sync_test * swarm: linting of simulation package * swarm: address review comments * swarm/network/stream: fix delivery_test bugs and refactor * swarm/network/stream: addressed PR comments @janos * swarm/network/stream: enforce waitKademlia, improve TestIntervals * swarm/network/stream: TestIntervals not waiting for chunk to be stored
Diffstat (limited to 'swarm/network/simulation/http_test.go')
-rw-r--r--swarm/network/simulation/http_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/swarm/network/simulation/http_test.go b/swarm/network/simulation/http_test.go
index 4d8bf9946..775cf9219 100644
--- a/swarm/network/simulation/http_test.go
+++ b/swarm/network/simulation/http_test.go
@@ -96,7 +96,12 @@ func sendRunSignal(t *testing.T) {
if err != nil {
t.Fatalf("Request failed: %v", err)
}
- defer resp.Body.Close()
+ defer func() {
+ err := resp.Body.Close()
+ if err != nil {
+ log.Error("Error closing response body", "err", err)
+ }
+ }()
log.Debug("Signal sent")
if resp.StatusCode != http.StatusOK {
t.Fatalf("err %s", resp.Status)