提交 609eb9e7 编写于 作者: C Christian Noon

Resolved deinitialization test random failures by handling state race condition.

上级 a5321881
......@@ -83,7 +83,8 @@ class ManagerTestCase: BaseTestCase {
manager = nil
// Then
XCTAssertEqual(request.task.state.rawValue, NSURLSessionTaskState.Canceling.rawValue, "request task state should be '.Canceling'")
let state = request.task.state
XCTAssertTrue(state == .Canceling || state == .Completed, "state should be .Canceling or .Completed")
XCTAssertNil(manager, "manager should be nil")
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册