Skip to content

Commit 66235d5

Browse files
committed
Reduced chunk, file, buffer sizes for faster GridFS testing
GODRIVER-1155 Change-Id: Iae8c7dc113473711e788a4069e21d0df87e9beb1
1 parent e4bd39d commit 66235d5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mongo/gridfs/gridfs_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func TestGridFS(t *testing.T) {
191191

192192
t.Run("RoundTrip", func(t *testing.T) {
193193

194-
oneMeg := 1024 * 1024
194+
oneK := 1024
195195
smallBuffSize := 100
196196

197197
tests := []struct {
@@ -200,12 +200,12 @@ func TestGridFS(t *testing.T) {
200200
fileSize int
201201
bufSize int // make -1 for no capacity for no bufSize
202202
}{
203-
{"RoundTrip: original", -1, UploadBufferSize, -1},
204-
{"RoundTrip: chunk size multiple of file", oneMeg, UploadBufferSize, -1},
205-
{"RoundTrip: chunk size is file size", oneMeg, oneMeg, -1},
206-
{"RoundTrip: chunk size multiple of file size and with strict buffer size", oneMeg, UploadBufferSize, smallBuffSize},
207-
{"RoundTrip: chunk size multiple of file size and buffer size", oneMeg, UploadBufferSize, UploadBufferSize},
208-
{"RoundTrip: chunk size, file size, buffer size all the same", oneMeg, oneMeg, oneMeg},
203+
{"RoundTrip: original", -1, oneK, -1},
204+
{"RoundTrip: chunk size multiple of file", oneK, oneK * 16, -1},
205+
{"RoundTrip: chunk size is file size", oneK, oneK, -1},
206+
{"RoundTrip: chunk size multiple of file size and with strict buffer size", oneK, oneK * 16, smallBuffSize},
207+
{"RoundTrip: chunk size multiple of file size and buffer size", oneK, oneK * 16, oneK * 16},
208+
{"RoundTrip: chunk size, file size, buffer size all the same", oneK, oneK, oneK},
209209
}
210210

211211
for _, test := range tests {

0 commit comments

Comments
 (0)