Ver código fonte

Merge pull request #2401 from onevcat/fix-test-timing-issue

Fix test timing issue in ImageCacheTests
Wei Wang 7 meses atrás
pai
commit
2d051facff
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      Tests/KingfisherTests/ImageCacheTests.swift

+ 1 - 1
Tests/KingfisherTests/ImageCacheTests.swift

@@ -376,7 +376,7 @@ class ImageCacheTests: XCTestCase {
                 exp.fulfill()
                 exp.fulfill()
             }
             }
 
 
-            delay(1) {
+            delay(2) { // File writing in disk cache has an approximate (round) creating time. 1 second is not enough.
                 self.cache.cleanExpiredDiskCache()
                 self.cache.cleanExpiredDiskCache()
             }
             }
         }
         }