mirror of
https://github.com/rclone/rclone
synced 2024-12-27 19:43:48 +01:00
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
@ -540,16 +540,13 @@ func Run(t *testing.T, opt *Opt) {
|
|||||||
minChunkSize = opt.ChunkedUpload.CeilChunkSize(minChunkSize)
|
minChunkSize = opt.ChunkedUpload.CeilChunkSize(minChunkSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
maxChunkSize := opt.ChunkedUpload.MaxChunkSize
|
maxChunkSize := 2 * fs.MebiByte
|
||||||
if maxChunkSize < minChunkSize {
|
if maxChunkSize < 2*minChunkSize {
|
||||||
if minChunkSize <= fs.MebiByte {
|
|
||||||
maxChunkSize = 2 * fs.MebiByte
|
|
||||||
} else {
|
|
||||||
maxChunkSize = 2 * minChunkSize
|
|
||||||
}
|
|
||||||
} else if maxChunkSize >= 2*minChunkSize {
|
|
||||||
maxChunkSize = 2 * minChunkSize
|
maxChunkSize = 2 * minChunkSize
|
||||||
}
|
}
|
||||||
|
if opt.ChunkedUpload.MaxChunkSize > 0 && maxChunkSize > opt.ChunkedUpload.MaxChunkSize {
|
||||||
|
maxChunkSize = opt.ChunkedUpload.MaxChunkSize
|
||||||
|
}
|
||||||
if opt.ChunkedUpload.CeilChunkSize != nil {
|
if opt.ChunkedUpload.CeilChunkSize != nil {
|
||||||
maxChunkSize = opt.ChunkedUpload.CeilChunkSize(maxChunkSize)
|
maxChunkSize = opt.ChunkedUpload.CeilChunkSize(maxChunkSize)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user