aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/network_test.go')
-rw-r--r--swarm/network_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/swarm/network_test.go b/swarm/network_test.go
index c291fce3b..606a83be2 100644
--- a/swarm/network_test.go
+++ b/swarm/network_test.go
@@ -508,14 +508,15 @@ func uploadFile(swarm *Swarm) (storage.Address, string, error) {
// File data is very short, but it is ensured that its
// uniqueness is very certain.
data := fmt.Sprintf("test content %s %x", time.Now().Round(0), b)
- k, wait, err := swarm.api.Put(data, "text/plain", false)
+ ctx := context.TODO()
+ k, wait, err := swarm.api.Put(ctx, data, "text/plain", false)
if err != nil {
return nil, "", err
}
if wait != nil {
- wait()
+ err = wait(ctx)
}
- return k, data, nil
+ return k, data, err
}
// retrieve is the function that is used for checking the availability of
@@ -570,7 +571,7 @@ func retrieve(
log.Debug("api get: check file", "node", id.String(), "key", f.addr.String(), "total files found", atomic.LoadUint64(totalFoundCount))
- r, _, _, _, err := swarm.api.Get(f.addr, "/")
+ r, _, _, _, err := swarm.api.Get(context.TODO(), f.addr, "/")
if err != nil {
errc <- fmt.Errorf("api get: node %s, key %s, kademlia %s: %v", id, f.addr, swarm.bzz.Hive, err)
return