File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
ACCESS_ID = os .environ ["ACCESS_ID" ]
12
12
ACCESS_KEY = os .environ ["ACCESS_KEY" ]
13
- test_bucket = "test01 "
13
+ test_bucket = "testbucket "
14
14
test_object = "test.txt"
15
15
special_file_name = "中文" + "→↓←→↖↗↙↘! \" #$%&'()*+,-./0123456789:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\ ]^_`abcdefghijklmnopqrstuvwxyz{|}~"
16
16
conf = CosConfig (
@@ -541,15 +541,16 @@ def test_list_multipart_uploads():
541
541
)
542
542
543
543
544
- def _test_upload_file_multithreading ():
544
+ def test_upload_file_multithreading ():
545
545
"""根据文件大小自动选择分块大小,多线程并发上传提高上传速度"""
546
- file_name = "thread_100MB "
547
- gen_file (file_name , 100 )
546
+ file_name = "thread_1GB "
547
+ gen_file (file_name , 12 ) # set 12MB beacuse travis too slow
548
548
st = time .time () # 记录开始时间
549
549
response = client .upload_file (
550
550
Bucket = test_bucket ,
551
551
Key = file_name ,
552
552
LocalFilePath = file_name ,
553
+ MAXThread = 10 ,
553
554
CacheControl = 'no-cache' ,
554
555
ContentDisposition = 'download.txt'
555
556
)
@@ -564,5 +565,5 @@ def _test_upload_file_multithreading():
564
565
test_put_get_versioning ()
565
566
test_put_get_delete_replication ()
566
567
test_upload_part_copy ()
567
- _test_upload_file_multithreading ()
568
+ test_upload_file_multithreading ()
568
569
tearDown ()
You can’t perform that action at this time.
0 commit comments