Skip to content

Commit

Permalink
change upload v2 test case
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn committed Mar 22, 2023
1 parent d204905 commit 2429979
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions QiniuSDKTests/QNConcurrentResumeUploadTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ - (void)testSwitchRegionV2 {
NSArray *sizeArray = @[@5000, @8000, @10000, @20000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"concurrent_resume_switch_region_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"concurrent_resume_switch_region_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeSwitchRegionTestWithFile:tempFile key:key config:config option:nil];
}
Expand Down Expand Up @@ -200,7 +200,7 @@ - (void)testHttpV2 {
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"concurrent_http_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"concurrent_http_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
}
Expand All @@ -217,7 +217,7 @@ - (void)testHttpsV2 {
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"concurrent_https_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"concurrent_https_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
}
Expand All @@ -238,7 +238,7 @@ - (void)testReuploadV2 {
NSArray *sizeArray = @[@30000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"concurrent_reupload_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"concurrent_reupload_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeResumeUploadTest:0.5 * 1024 * size.longLongValue tempFile:tempFile key:key config:config option:nil];
}
Expand All @@ -253,7 +253,7 @@ - (void)testNoKeyV2 {
}];

NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
NSString *keyUp = [NSString stringWithFormat:@"concurrent_NoKey_v2_%dk_%d", 600, timestamp];
NSString *keyUp = [NSString stringWithFormat:@"concurrent_NoKey_v2_%dk_%ld", 600, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:600 * 1024 identifier:keyUp];
tempFile.canRemove = NO;
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:nil config:configHttp option:nil];
Expand Down
12 changes: 6 additions & 6 deletions QiniuSDKTests/QNResumeUploadTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ - (void)testSwitchRegionV2 {
NSArray *sizeArray = @[@1000, @3000, @4000, @5000, @8000, @10000, @20000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"resume_switch_region_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"resume_switch_region_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeSwitchRegionTestWithFile:tempFile key:key config:config option:nil];
}
Expand Down Expand Up @@ -225,7 +225,7 @@ - (void)testHttpV2 {
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"resume_http_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"resume_http_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
}
Expand All @@ -241,7 +241,7 @@ - (void)testHttpsV2 {
NSArray *sizeArray = @[@500, @1000, @3000, @4000, @5000, @8000, @10000, @20000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"resume_https_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"resume_https_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:config option:nil];
}
Expand All @@ -261,7 +261,7 @@ - (void)testReuploadV2 {
NSArray *sizeArray = @[@30000];
NSInteger timestamp = [[NSDate date] timeIntervalSince1970];
for (NSNumber *size in sizeArray) {
NSString *key = [NSString stringWithFormat:@"resume_reupload_v2_%@k_%d", size, timestamp];
NSString *key = [NSString stringWithFormat:@"resume_reupload_v2_%@k_%ld", size, (long)timestamp];
QNTempFile *tempFile = [QNTempFile createTempFileWithSize:[size intValue] * 1024 identifier:key];
[self allFileTypeResumeUploadTest:0.5 * 1024 * size.longLongValue tempFile:tempFile key:key config:config option:nil];
}
Expand All @@ -276,7 +276,7 @@ - (void)testNoKeyV2 {
}];

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

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

[self allFileTypeUploadAndAssertSuccessResult:tempFile key:key config:configHttp option:option];
Expand Down

0 comments on commit 2429979

Please sign in to comment.