Skip to content

Commit 258af6d

Browse files
committed
Minor fix
1 parent ea47303 commit 258af6d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Tests/NavigatorTests/UITests/NavigatorTestHost/MemoryTracker.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@ import ReadiumNavigator
5252
}
5353

5454
private func pollAllocations() {
55-
var deallocated = true
56-
57-
refs.removeAll { ref in
58-
deallocated = deallocated && ref.isDeallocated
59-
return ref.isDeallocated
60-
}
55+
refs.removeAll { $0.isDeallocated }
56+
let deallocated = refs.isEmpty
6157

6258
if allDeallocated != deallocated {
6359
allDeallocated = deallocated

Tests/NavigatorTests/UITests/NavigatorUITests/XCUIApplication.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension XCUIApplication {
3434
/// A timeout is used to make sure the memory is cleared.
3535
@discardableResult
3636
func assertAllMemoryDeallocated() -> Self {
37-
switches[.allMemoryDeallocated].assertIs(true, waitForTimeout: 10)
37+
switches[.allMemoryDeallocated].assertIs(true, waitForTimeout: 30)
3838
return self
3939
}
4040
}
@@ -58,7 +58,7 @@ struct ReaderUI {
5858

5959
/// Waits for the navigator to be ready.
6060
@discardableResult
61-
func assertReady(timeout: TimeInterval = 10) -> Self {
61+
func assertReady(timeout: TimeInterval = 30) -> Self {
6262
app.switches[.isNavigatorReady].assertIs(true, waitForTimeout: timeout)
6363
return self
6464
}

0 commit comments

Comments
 (0)