aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/common_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/common_test.go')
-rw-r--r--swarm/storage/common_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/swarm/storage/common_test.go b/swarm/storage/common_test.go
index 23d43becc..6955ee827 100644
--- a/swarm/storage/common_test.go
+++ b/swarm/storage/common_test.go
@@ -83,7 +83,7 @@ func newLDBStore(t *testing.T) (*LDBStore, func()) {
return db, cleanup
}
-func mputRandomChunks(store ChunkStore, n int, chunksize int64) ([]Chunk, error) {
+func mputRandomChunks(store ChunkStore, n int) ([]Chunk, error) {
return mput(store, n, GenerateRandomChunk)
}
@@ -91,7 +91,7 @@ func mput(store ChunkStore, n int, f func(i int64) Chunk) (hs []Chunk, err error
// put to localstore and wait for stored channel
// does not check delivery error state
errc := make(chan error)
- ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
+ ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()
for i := int64(0); i < int64(n); i++ {
chunk := f(ch.DefaultSize)
@@ -159,8 +159,8 @@ func (r *brokenLimitedReader) Read(buf []byte) (int, error) {
return r.lr.Read(buf)
}
-func testStoreRandom(m ChunkStore, n int, chunksize int64, t *testing.T) {
- chunks, err := mputRandomChunks(m, n, chunksize)
+func testStoreRandom(m ChunkStore, n int, t *testing.T) {
+ chunks, err := mputRandomChunks(m, n)
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
@@ -170,8 +170,8 @@ func testStoreRandom(m ChunkStore, n int, chunksize int64, t *testing.T) {
}
}
-func testStoreCorrect(m ChunkStore, n int, chunksize int64, t *testing.T) {
- chunks, err := mputRandomChunks(m, n, chunksize)
+func testStoreCorrect(m ChunkStore, n int, t *testing.T) {
+ chunks, err := mputRandomChunks(m, n)
if err != nil {
t.Fatalf("expected no error, got %v", err)
}
@@ -195,7 +195,7 @@ func testStoreCorrect(m ChunkStore, n int, chunksize int64, t *testing.T) {
}
}
-func benchmarkStorePut(store ChunkStore, n int, chunksize int64, b *testing.B) {
+func benchmarkStorePut(store ChunkStore, n int, b *testing.B) {
chunks := make([]Chunk, n)
i := 0
f := func(dataSize int64) Chunk {
@@ -222,8 +222,8 @@ func benchmarkStorePut(store ChunkStore, n int, chunksize int64, b *testing.B) {
}
}
-func benchmarkStoreGet(store ChunkStore, n int, chunksize int64, b *testing.B) {
- chunks, err := mputRandomChunks(store, n, chunksize)
+func benchmarkStoreGet(store ChunkStore, n int, b *testing.B) {
+ chunks, err := mputRandomChunks(store, n)
if err != nil {
b.Fatalf("expected no error, got %v", err)
}