From 534009fa492133cc19d3d44b3327eb52af23e84d Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Fri, 21 Dec 2018 11:55:59 +0100 Subject: [PATCH] swarm/storage/localstore: use storage.MaxPO in subscription tests --- swarm/storage/localstore/subscriptions_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/swarm/storage/localstore/subscriptions_test.go b/swarm/storage/localstore/subscriptions_test.go index bf67a11eab..e421a69217 100644 --- a/swarm/storage/localstore/subscriptions_test.go +++ b/swarm/storage/localstore/subscriptions_test.go @@ -255,9 +255,7 @@ func TestSubscribePull(t *testing.T) { // to validate the number of chunks received by the subscription errChan := make(chan error) - var maxBin uint8 = 32 - - for bin := uint8(0); bin < maxBin; bin++ { + for bin := uint8(0); bin < uint8(storage.MaxPO); bin++ { sub, err := db.SubscribePull(ctx, bin) if err != nil { t.Fatal(err) @@ -354,14 +352,12 @@ func TestSubscribePull_multiple(t *testing.T) { // to validate the number of chunks received by the subscription errChan := make(chan error) - var maxBin uint8 = 32 - subsCount := 10 // start a number of subscriptions // that all of them will write every chunk error to errChan for j := 0; j < subsCount; j++ { - for bin := uint8(0); bin < maxBin; bin++ { + for bin := uint8(0); bin < uint8(storage.MaxPO); bin++ { sub, err := db.SubscribePull(ctx, bin) if err != nil { t.Fatal(err)