Skip to content

Commit 62532ad

Browse files
committed
Fix test timing issue in ImageCacheTests
Increase delay from 1 to 2 seconds in testCleanDiskCacheWithUsedSpaceInsufficient to accommodate file writing in disk cache which has an approximate (round) creating time. This resolves CI test stability issues.
1 parent 88a807f commit 62532ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/KingfisherTests/ImageCacheTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class ImageCacheTests: XCTestCase {
376376
exp.fulfill()
377377
}
378378

379-
delay(1) {
379+
delay(2) { // File writing in disk cache has an approximate (round) creating time. 1 second is not enough.
380380
self.cache.cleanExpiredDiskCache()
381381
}
382382
}

0 commit comments

Comments
 (0)