Skip to content

Commit a93c168

Browse files
committed
Update tests timeout
1 parent b1389a2 commit a93c168

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

RxHttpClient/RequestPlugin/ActivityIndicatorPlugin.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public final class NetworkActivityIndicatorPlugin : RequestPluginType {
2121

2222
var counter = 0 {
2323
didSet {
24+
guard !Thread.isMainThread else {
25+
application.isNetworkActivityIndicatorVisible = counter != 0
26+
return
27+
}
28+
2429
DispatchQueue.main.async {
2530
self.application.isNetworkActivityIndicatorVisible = self.counter != 0
2631
}

RxHttpClientTests/HttpClientBasicTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class HttpClientBasicTests: XCTestCase {
4040

4141
XCTAssertEqual(false, fakeSession.task?.isCancelled)
4242

43-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { disposable.dispose() }
43+
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) { disposable.dispose() }
4444

4545
let waitResult = XCTWaiter().wait(for: [resumeExpectation, cancelExpectation], timeout: waitTimeout, enforceOrder: true)
4646

0 commit comments

Comments
 (0)