Skip to content

Commit 2429979

Browse files
author
YangSen-qn
committed
change upload v2 test case
1 parent d204905 commit 2429979

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

QiniuSDKTests/QNConcurrentResumeUploadTest.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ - (void)testSwitchRegionV2 {
167167
NSArray *sizeArray = @[@5000, @8000, @10000, @20000];
168168
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
169169
for (NSNumber *size in sizeArray) {
170-
NSString *key = [NSString stringWithFormat:@"concurrent_resume_switch_region_v2_%@k_%d", size, timestamp];
170+
NSString *key = [NSString stringWithFormat:@"concurrent_resume_switch_region_v2_%@k_%ld", size, (long)timestamp];
171171
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
172172
[self allFileTypeSwitchRegionTestWithFile:tempFile key:key config:config option:nil];
173173
}
@@ -200,7 +200,7 @@ - (void)testHttpV2 {
200200
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
201201
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
202202
for (NSNumber *size in sizeArray) {
203-
NSString *key = [NSString stringWithFormat:@"concurrent_http_v2_%@k_%d", size, timestamp];
203+
NSString *key = [NSString stringWithFormat:@"concurrent_http_v2_%@k_%ld", size, (long)timestamp];
204204
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
205205
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
206206
}
@@ -217,7 +217,7 @@ - (void)testHttpsV2 {
217217
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
218218
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
219219
for (NSNumber *size in sizeArray) {
220-
NSString *key = [NSString stringWithFormat:@"concurrent_https_v2_%@k_%d", size, timestamp];
220+
NSString *key = [NSString stringWithFormat:@"concurrent_https_v2_%@k_%ld", size, (long)timestamp];
221221
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
222222
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
223223
}
@@ -238,7 +238,7 @@ - (void)testReuploadV2 {
238238
NSArray *sizeArray = @[@30000];
239239
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
240240
for (NSNumber *size in sizeArray) {
241-
NSString *key = [NSString stringWithFormat:@"concurrent_reupload_v2_%@k_%d", size, timestamp];
241+
NSString *key = [NSString stringWithFormat:@"concurrent_reupload_v2_%@k_%ld", size, (long)timestamp];
242242
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
243243
[self allFileTypeResumeUploadTest:0.5 * 1024 * size.longLongValue tempFile:tempFile key:key config:config option:nil];
244244
}
@@ -253,7 +253,7 @@ - (void)testNoKeyV2 {
253253
}];
254254

255255
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
256-
NSString *keyUp = [NSString stringWithFormat:@"concurrent_NoKey_v2_%dk_%d", 600, timestamp];
256+
NSString *keyUp = [NSString stringWithFormat:@"concurrent_NoKey_v2_%dk_%ld", 600, (long)timestamp];
257257
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:600 * 1024 identifier:keyUp];
258258
tempFile.canRemove = NO;
259259
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:nil config:configHttp option:nil];

QiniuSDKTests/QNResumeUploadTest.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ - (void)testSwitchRegionV2 {
194194
NSArray *sizeArray = @[@1000, @3000, @4000, @5000, @8000, @10000, @20000];
195195
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
196196
for (NSNumber *size in sizeArray) {
197-
NSString *key = [NSString stringWithFormat:@"resume_switch_region_v2_%@k_%d", size, timestamp];
197+
NSString *key = [NSString stringWithFormat:@"resume_switch_region_v2_%@k_%ld", size, (long)timestamp];
198198
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
199199
[self allFileTypeSwitchRegionTestWithFile:tempFile key:key config:config option:nil];
200200
}
@@ -225,7 +225,7 @@ - (void)testHttpV2 {
225225
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
226226
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
227227
for (NSNumber *size in sizeArray) {
228-
NSString *key = [NSString stringWithFormat:@"resume_http_v2_%@k_%d", size, timestamp];
228+
NSString *key = [NSString stringWithFormat:@"resume_http_v2_%@k_%ld", size, (long)timestamp];
229229
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
230230
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
231231
}
@@ -241,7 +241,7 @@ - (void)testHttpsV2 {
241241
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
242242
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
243243
for (NSNumber *size in sizeArray) {
244-
NSString *key = [NSString stringWithFormat:@"resume_https_v2_%@k_%d", size, timestamp];
244+
NSString *key = [NSString stringWithFormat:@"resume_https_v2_%@k_%ld", size, (long)timestamp];
245245
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
246246
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
247247
}
@@ -261,7 +261,7 @@ - (void)testReuploadV2 {
261261
NSArray *sizeArray = @[@30000];
262262
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
263263
for (NSNumber *size in sizeArray) {
264-
NSString *key = [NSString stringWithFormat:@"resume_reupload_v2_%@k_%d", size, timestamp];
264+
NSString *key = [NSString stringWithFormat:@"resume_reupload_v2_%@k_%ld", size, (long)timestamp];
265265
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
266266
[self allFileTypeResumeUploadTest:0.5 * 1024 * size.longLongValue tempFile:tempFile key:key config:config option:nil];
267267
}
@@ -276,7 +276,7 @@ - (void)testNoKeyV2 {
276276
}];
277277

278278
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
279-
NSString *keyUp = [NSString stringWithFormat:@"resume_NoKey_v2_%dk_%d", 600, timestamp];
279+
NSString *keyUp = [NSString stringWithFormat:@"resume_NoKey_v2_%dk_%ld", 600, (long)timestamp];
280280
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:600 * 1024 identifier:keyUp];
281281
tempFile.canRemove = NO;
282282
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:nil config:configHttp option:nil];
@@ -333,7 +333,7 @@ - (void)testCustomParamV2 {
333333
}];
334334

335335
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
336-
NSString *key = [NSString stringWithFormat:@"resume_custom_param_v2_%d", timestamp];
336+
NSString *key = [NSString stringWithFormat:@"resume_custom_param_v2_%ld", (long)timestamp];
337337
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:1024 * 1024 * 5 identifier:key];
338338

339339
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:configHttp option:option];

0 commit comments

Comments
 (0)