Skip to content

Commit

Permalink
fixing lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld committed Jan 14, 2025
1 parent f949980 commit 6af4e53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protocol FeatureFlagCaching {
///
///
func getCachedData(cacheKey: String, contextHash: String) -> (items: StoredItems?, etag: String?, lastUpdated: Date?)

/// Retrieve the date the cache for the given key was last updated. See getCachedData for more information.
///
/// - parameter cacheKey: The index key into the local cache store.
Expand Down Expand Up @@ -108,7 +108,7 @@ final class FeatureFlagCache: FeatureFlagCaching {

return (items: cachedFlags.flags, etag: etag, lastUpdated: Date(timeIntervalSince1970: TimeInterval(lastUpdated / 1_000)))
}

func getCachedDataLastUpdatedDate(cacheKey: String, contextHash: String) -> Date? {

var cachedContexts: [String: Int64] = [:]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ final class FeatureFlagCacheSpec: XCTestCase {
let setMetadata = try JSONDecoder().decode([String: Int64].self, from: mockValueCache.setReceivedArguments!.value)
XCTAssertEqual(setMetadata, [hashedContextKey: now.millisSince1970])
}

func testGetCachedDataLastUpdatedDate() {
let now = Date()
let flagCache = FeatureFlagCache(serviceFactory: ClientServiceFactory(logger: .disabled), mobileKey: "abc", maxCachedContexts: 5)
Expand All @@ -187,7 +187,7 @@ final class FeatureFlagCacheSpec: XCTestCase {
let lastUpdated = flagCache.getCachedDataLastUpdatedDate(cacheKey: "key", contextHash: "hash")
XCTAssertEqual(lastUpdated!.millisSince1970, now.millisSince1970, accuracy: 1_000)
}

func testGetCachedDataLastUpdatedDateKeyDoesntExist() {
let now = Date()
let flagCache = FeatureFlagCache(serviceFactory: ClientServiceFactory(logger: .disabled), mobileKey: "abc", maxCachedContexts: 5)
Expand Down

0 comments on commit 6af4e53

Please sign in to comment.