File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func TestDivide(t *testing.T) {
32
32
expected Option
33
33
}{
34
34
{
35
- caseName : "ContentLength:5/5 " ,
35
+ caseName : "ContentLength and Concurrency is same value " ,
36
36
concurrency : 5 ,
37
37
expected : Option {
38
38
URL : url ,
@@ -48,7 +48,7 @@ func TestDivide(t *testing.T) {
48
48
},
49
49
},
50
50
{
51
- caseName : "ContentLength:5/1 " ,
51
+ caseName : "One Thread " ,
52
52
concurrency : 1 ,
53
53
expected : Option {
54
54
URL : url ,
@@ -60,7 +60,20 @@ func TestDivide(t *testing.T) {
60
60
},
61
61
},
62
62
{
63
- caseName : "ContentLength:5/10" ,
63
+ caseName : "Remainder:ContentLength%Concurrency!=0" ,
64
+ concurrency : 2 ,
65
+ expected : Option {
66
+ URL : url ,
67
+ ContentLength : contentLength ,
68
+ Concurrency : 2 ,
69
+ Units : []Unit {
70
+ {TempFileName : "0_test.iso" , RangeStart : 0 , RangeEnd : 1 },
71
+ {TempFileName : "1_test.iso" , RangeStart : 2 , RangeEnd : 4 },
72
+ },
73
+ },
74
+ },
75
+ {
76
+ caseName : "Concurrency exceed the contentLength." ,
64
77
concurrency : 10 ,
65
78
expected : Option {
66
79
URL : url ,
You can’t perform that action at this time.
0 commit comments