fstests: fix maximum tested size in TestFsPutChunked
Before this it was possible hat maxChunkSize was incorrectly set to 200.
This commit is contained in:
parent
67703a73de
commit
15ce0ae57c
1 changed files with 5 additions and 8 deletions
|
@ -540,16 +540,13 @@ func Run(t *testing.T, opt *Opt) {
|
|||
minChunkSize = opt.ChunkedUpload.CeilChunkSize(minChunkSize)
|
||||
}
|
||||
|
||||
maxChunkSize := opt.ChunkedUpload.MaxChunkSize
|
||||
if maxChunkSize < minChunkSize {
|
||||
if minChunkSize <= fs.MebiByte {
|
||||
maxChunkSize = 2 * fs.MebiByte
|
||||
} else {
|
||||
maxChunkSize = 2 * minChunkSize
|
||||
}
|
||||
} else if maxChunkSize >= 2*minChunkSize {
|
||||
maxChunkSize := 2 * fs.MebiByte
|
||||
if maxChunkSize < 2*minChunkSize {
|
||||
maxChunkSize = 2 * minChunkSize
|
||||
}
|
||||
if opt.ChunkedUpload.MaxChunkSize > 0 && maxChunkSize > opt.ChunkedUpload.MaxChunkSize {
|
||||
maxChunkSize = opt.ChunkedUpload.MaxChunkSize
|
||||
}
|
||||
if opt.ChunkedUpload.CeilChunkSize != nil {
|
||||
maxChunkSize = opt.ChunkedUpload.CeilChunkSize(maxChunkSize)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue