@@ -192,8 +192,9 @@ - (void)testSwitchRegionV2 {
192192 builder.useHttps = YES ;
193193 }];
194194 NSArray *sizeArray = @[@1000 , @3000 , @4000 , @5000 , @8000 , @10000 , @20000 ];
195+ NSInteger timestamp = [[NSDate date ] timeIntervalSince1970 ];
195196 for (NSNumber *size in sizeArray) {
196- NSString *key = [NSString stringWithFormat: @" resume_switch_region_v2_%@ k " , size];
197+ NSString *key = [NSString stringWithFormat: @" resume_switch_region_v2_%@ k_ %d " , size, timestamp ];
197198 QNTempFile *tempFile = [QNTempFile createTempFileWithSize: [size intValue ] * 1024 identifier: key];
198199 [self allFileTypeSwitchRegionTestWithFile: tempFile key: key config: config option: nil ];
199200 }
@@ -222,8 +223,9 @@ - (void)testHttpV2 {
222223 builder.useHttps = NO ;
223224 }];
224225 NSArray *sizeArray = @[@500 , @1000 , @3000 , @4000 , @5000 , @8000 , @10000 , @20000 ];
226+ NSInteger timestamp = [[NSDate date ] timeIntervalSince1970 ];
225227 for (NSNumber *size in sizeArray) {
226- NSString *key = [NSString stringWithFormat: @" resume_http_v2_%@ k " , size];
228+ NSString *key = [NSString stringWithFormat: @" resume_http_v2_%@ k_ %d " , size, timestamp ];
227229 QNTempFile *tempFile = [QNTempFile createTempFileWithSize: [size intValue ] * 1024 identifier: key];
228230 [self allFileTypeUploadAndAssertSuccessResult: tempFile key: key config: config option: nil ];
229231 }
@@ -237,8 +239,9 @@ - (void)testHttpsV2 {
237239 builder.useHttps = YES ;
238240 }];
239241 NSArray *sizeArray = @[@500 , @1000 , @3000 , @4000 , @5000 , @8000 , @10000 , @20000 ];
242+ NSInteger timestamp = [[NSDate date ] timeIntervalSince1970 ];
240243 for (NSNumber *size in sizeArray) {
241- NSString *key = [NSString stringWithFormat: @" resume_https_v2_%@ k " , size];
244+ NSString *key = [NSString stringWithFormat: @" resume_https_v2_%@ k_ %d " , size, timestamp ];
242245 QNTempFile *tempFile = [QNTempFile createTempFileWithSize: [size intValue ] * 1024 identifier: key];
243246 [self allFileTypeUploadAndAssertSuccessResult: tempFile key: key config: config option: nil ];
244247 }
@@ -256,8 +259,9 @@ - (void)testReuploadV2 {
256259 }];
257260
258261 NSArray *sizeArray = @[@30000 ];
262+ NSInteger timestamp = [[NSDate date ] timeIntervalSince1970 ];
259263 for (NSNumber *size in sizeArray) {
260- NSString *key = [NSString stringWithFormat: @" resume_reupload_v2_%@ k " , size];
264+ NSString *key = [NSString stringWithFormat: @" resume_reupload_v2_%@ k_ %d " , size, timestamp ];
261265 QNTempFile *tempFile = [QNTempFile createTempFileWithSize: [size intValue ] * 1024 identifier: key];
262266 [self allFileTypeResumeUploadTest: 0.5 * 1024 * size.longLongValue tempFile: tempFile key: key config: config option: nil ];
263267 }
@@ -271,7 +275,8 @@ - (void)testNoKeyV2 {
271275 builder.useHttps = NO ;
272276 }];
273277
274- NSString *keyUp = [NSString stringWithFormat: @" resume_NoKey_v2_%d k" , 600 ];
278+ NSInteger timestamp = [[NSDate date ] timeIntervalSince1970 ];
279+ NSString *keyUp = [NSString stringWithFormat: @" resume_NoKey_v2_%d k_%d " , 600 , timestamp];
275280 QNTempFile *tempFile = [QNTempFile createTempFileWithSize: 600 * 1024 identifier: keyUp];
276281 tempFile.canRemove = NO ;
277282 [self allFileTypeUploadAndAssertSuccessResult: tempFile key: nil config: configHttp option: nil ];
@@ -327,7 +332,8 @@ - (void)testCustomParamV2 {
327332 builder.useHttps = NO ;
328333 }];
329334
330- NSString *key = @" resume_custom_param_v2" ;
335+ NSInteger timestamp = [[NSDate date ] timeIntervalSince1970 ];
336+ NSString *key = [NSString stringWithFormat: @" resume_custom_param_v2_%d " , timestamp];
331337 QNTempFile *tempFile = [QNTempFile createTempFileWithSize: 1024 * 1024 * 5 identifier: key];
332338
333339 [self allFileTypeUploadAndAssertSuccessResult: tempFile key: key config: configHttp option: option];
0 commit comments