Skip to content

Commit

Permalink
fix(redundancy): bzz unit test (#4603)
Browse files Browse the repository at this point in the history
  • Loading branch information
istae authored Feb 29, 2024
1 parent 93ed7ed commit fd46f75
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/api/bzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"strconv"
"strings"
"testing"
"time"

"github.com/ethersphere/bee/pkg/api"
"github.com/ethersphere/bee/pkg/file/loadsave"
Expand Down Expand Up @@ -64,6 +63,7 @@ import (
//
// nolint:thelper
func TestBzzUploadDownloadWithRedundancy(t *testing.T) {
t.Parallel()
fileUploadResource := "/bzz"
fileDownloadResource := func(addr string) string { return "/bzz/" + addr + "/" }

Expand All @@ -73,7 +73,6 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) {
if err != nil {
t.Fatal(err)
}
fetchTimeout := 100 * time.Millisecond
store := mockstorer.NewForgettingStore(inmemchunkstore.New())
storerMock := mockstorer.NewWithChunkStore(store)
client, _, _, _ := newTestServer(t, testServerOptions{
Expand Down Expand Up @@ -131,7 +130,6 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) {
jsonhttptest.WithRequestHeader(api.SwarmRedundancyLevelHeader, "0"),
jsonhttptest.WithRequestHeader(api.SwarmRedundancyStrategyHeader, "0"),
jsonhttptest.WithRequestHeader(api.SwarmRedundancyFallbackModeHeader, "false"),
jsonhttptest.WithRequestHeader(api.SwarmChunkRetrievalTimeoutHeader, fetchTimeout.String()),
jsonhttptest.WithPutResponseBody(&body),
)

Expand All @@ -157,7 +155,6 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) {
}
req.Header.Set(api.SwarmRedundancyStrategyHeader, "0")
req.Header.Set(api.SwarmRedundancyFallbackModeHeader, "false")
req.Header.Set(api.SwarmChunkRetrievalTimeoutHeader, fetchTimeout.String())

resp, err := client.Do(req)
if err != nil {
Expand Down Expand Up @@ -188,7 +185,6 @@ func TestBzzUploadDownloadWithRedundancy(t *testing.T) {
}
req.Header.Set(api.SwarmRedundancyStrategyHeader, "3")
req.Header.Set(api.SwarmRedundancyFallbackModeHeader, "true")
req.Header.Set(api.SwarmChunkRetrievalTimeoutHeader, fetchTimeout.String())

resp, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit fd46f75

Please sign in to comment.