Sfoglia il codice sorgente

Loose condition again

onevcat 5 anni fa
parent
commit
67caafe440
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      Tests/KingfisherTests/DiskStorageTests.swift

+ 2 - 2
Tests/KingfisherTests/DiskStorageTests.swift

@@ -96,7 +96,7 @@ class DiskStorageTests: XCTestCase {
         try! storage.store(value: "1", forKey: "1", expiration: .seconds(1))
         try! storage.store(value: "1", forKey: "1", expiration: .seconds(1))
 
 
         XCTAssertTrue(storage.isCached(forKey: "1", referenceDate: now))
         XCTAssertTrue(storage.isCached(forKey: "1", referenceDate: now))
-        XCTAssertFalse(storage.isCached(forKey: "1", referenceDate: now.addingTimeInterval(2)))
+        XCTAssertFalse(storage.isCached(forKey: "1", referenceDate: now.addingTimeInterval(5)))
     }
     }
 
 
     func testConfigExpiration() {
     func testConfigExpiration() {
@@ -106,7 +106,7 @@ class DiskStorageTests: XCTestCase {
         storage.config.expiration = .seconds(1)
         storage.config.expiration = .seconds(1)
         try! storage.store(value: "1", forKey: "1")
         try! storage.store(value: "1", forKey: "1")
         XCTAssertTrue(storage.isCached(forKey: "1", referenceDate: now))
         XCTAssertTrue(storage.isCached(forKey: "1", referenceDate: now))
-        XCTAssertFalse(storage.isCached(forKey: "1", referenceDate: now.addingTimeInterval(2)))
+        XCTAssertFalse(storage.isCached(forKey: "1", referenceDate: now.addingTimeInterval(5)))
     }
     }
 
 
     func testExtendExpirationByAccessing() {
     func testExtendExpirationByAccessing() {