Skip to content

Commit adef250

Browse files
authored
Update ThreadSafetyTests.swift
1 parent 83e4707 commit adef250

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/CacheTests/ThreadSafetyTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class ThreadSafetyTests: XCTestCase {
1717

1818
func testLRUCacheConcurrentAccess() {
1919
let iterations = 500
20-
let cache = LRUCache<Int, Int>(capacity: UInt(iterations))
20+
let cache = LRUCache<Int, Int>(capacity: 5)
2121

2222
DispatchQueue.concurrentPerform(iterations: iterations) { i in
2323
cache.set(value: i, forKey: i)
@@ -29,7 +29,7 @@ final class ThreadSafetyTests: XCTestCase {
2929

3030
func testExpiringCacheConcurrentAccess() {
3131
let iterations = 200
32-
let cache = ExpiringCache<Int, Int>(duration: .hours(1))
32+
let cache = ExpiringCache<Int, Int>(duration: .seconds(1))
3333

3434
DispatchQueue.concurrentPerform(iterations: iterations) { i in
3535
cache.set(value: i, forKey: i)

0 commit comments

Comments
 (0)