diff --git a/Tests/Tests/SDWebCacheCategoriesTests.m b/Tests/Tests/SDWebCacheCategoriesTests.m index 1e46c656..e91c5ece 100644 --- a/Tests/Tests/SDWebCacheCategoriesTests.m +++ b/Tests/Tests/SDWebCacheCategoriesTests.m @@ -203,6 +203,8 @@ - (void)testUIViewCancelCurrentImageLoad { UIView *imageView = [[UIView alloc] init]; NSURL *originalImageURL = [NSURL URLWithString:kTestJPEGURL]; + [SDImageCache.sharedImageCache removeImageFromDiskForKey:kTestJPEGURL]; + [SDImageCache.sharedImageCache removeImageFromMemoryForKey:kTestJPEGURL]; [imageView sd_internalSetImageWithURL:originalImageURL placeholderImage:nil options:0 context:nil setImageBlock:nil progress:nil completed:nil]; [imageView sd_cancelCurrentImageLoad]; NSString *operationKey = NSStringFromClass(UIView.class); @@ -214,6 +216,8 @@ UIView *imageView = [[UIView alloc] init]; NSURL *originalImageURL = [NSURL URLWithString:kTestJPEGURL]; + [SDImageCache.sharedImageCache removeImageFromDiskForKey:kTestJPEGURL]; + [SDImageCache.sharedImageCache removeImageFromMemoryForKey:kTestJPEGURL]; [imageView sd_internalSetImageWithURL:originalImageURL placeholderImage:nil options:0 context:nil setImageBlock:nil progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) { expect(error).notTo.beNil(); expect(error.code).equal(SDWebImageErrorCancelled); diff --git a/Tests/Tests/SDWebImagePrefetcherTests.m b/Tests/Tests/SDWebImagePrefetcherTests.m index 65d51288..f0968ead 100644 --- a/Tests/Tests/SDWebImagePrefetcherTests.m +++ b/Tests/Tests/SDWebImagePrefetcherTests.m @@ -154,9 +154,9 @@ - (void)test07DownloaderCancelDuringPrefetching { XCTestExpectation *expectation = [self expectationWithDescription:@"Downloader cancel during prefetch should not hung up"]; - NSArray *imageURLs = @[@"http://via.placeholder.com/3000x3000.jpg", - @"http://via.placeholder.com/4000x4000.jpg", - @"http://via.placeholder.com/5000x5000.jpg"]; + NSArray *imageURLs = @[@"http://via.placeholder.com/5000x5000.jpg", + @"http://via.placeholder.com/6000x6000.jpg", + @"http://via.placeholder.com/7000x7000.jpg"]; for (NSString *url in imageURLs) { [SDImageCache.sharedImageCache removeImageFromDiskForKey:url]; }