"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
lib/pool: fix unreliable TestPoolMaxBufferMemory test
Nick Craig-Woodb5cbb7520df9
diff --git a/lib/pool/pool_test.go b/lib/pool/pool_test.goindex 5fa05da7c..5c0434e82 100644--- a/lib/pool/pool_test.go+++ b/lib/pool/pool_test.go@@ -288,22 +288,24 @@ func TestPoolMaxBufferMemory(t *testing.T) {}})- for i := 0; i < 20; i++ {+ const trials = 50+ for i := range trials {wg.Add(1)go func() {defer wg.Done()- if i < 4 {- buf := bp.GetN(i + 1)- countBuf(i + 1)- time.Sleep(100 * time.Millisecond)+ if i < trials/2 {+ n := i%4 + 1+ buf := bp.GetN(n)+ countBuf(n)+ time.Sleep(1 * time.Millisecond)+ countBuf(-n)bp.PutN(buf)- countBuf(-(i + 1))} else {buf := bp.Get()countBuf(1)- time.Sleep(100 * time.Millisecond)- bp.Put(buf)+ time.Sleep(1 * time.Millisecond)countBuf(-1)+ bp.Put(buf)}}()}