From c5dcae33e0f840fc7ebba550e38400a9ef2fce10 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Sat, 22 Dec 2018 01:04:43 +0100 Subject: [PATCH] swarm/storage/localstore: fix TestSubscribePull to include MaxPO --- swarm/storage/localstore/subscriptions_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/storage/localstore/subscriptions_test.go b/swarm/storage/localstore/subscriptions_test.go index 8ff817bdb5..d358656499 100644 --- a/swarm/storage/localstore/subscriptions_test.go +++ b/swarm/storage/localstore/subscriptions_test.go @@ -249,7 +249,7 @@ func TestSubscribePull(t *testing.T) { // to validate the number of addresses received by the subscription errChan := make(chan error) - for bin := uint8(0); bin < uint8(storage.MaxPO); bin++ { + for bin := uint8(0); bin <= uint8(storage.MaxPO); bin++ { sub, err := db.SubscribePull(ctx, bin) if err != nil { t.Fatal(err) @@ -348,7 +348,7 @@ func TestSubscribePull_multiple(t *testing.T) { // start a number of subscriptions // that all of them will write every address error to errChan for j := 0; j < subsCount; j++ { - for bin := uint8(0); bin < uint8(storage.MaxPO); bin++ { + for bin := uint8(0); bin <= uint8(storage.MaxPO); bin++ { sub, err := db.SubscribePull(ctx, bin) if err != nil { t.Fatal(err)