Closed
Bug 1201131
Opened 9 years ago
Closed 9 years ago
[swift 2.0] Cancelled Requests in Firefox Account Login tests
Categories
(Firefox for iOS :: General, defect)
Tracking
()
People
(Reporter: fluffyemily, Assigned: rnewman, Mentored)
Details
Attachments
(1 file)
When executing Firefox Account integration tests, the request is being cancelled before execution causing the tests to fail. I have no idea why this is happening. The cancel() on the Alamofire request is never called, but the response that we receive is FAILURE: Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://api.accounts.firefox.com/v1/account/login?keys=true, NSLocalizedDescription=cancelled, NSErrorFailingURLStringKey=https://api.accounts.firefox.com/v1/account/login?keys=true} ▿ Failure : 2 elements ▿ .0 : Optional(<>) The NSURLErrorDomain -999 occurs when a request is cancelled, or another request is executed that causes the existing request to cancel. I can see neither request() being called more than once, nor cancel() being called on the Alamofire request object. The failing tests are: Sync -> LiveAccountStorageTests -> testLive() and testStateMachine() Accounts -> SyncAuthStateTests -> testLive() Issues occur when calling FxAClient10: login() using test account information. Logging in and syncing using the test account works totally fine from within the app.
Flags: needinfo?(rnewman)
Reporter | ||
Updated•9 years ago
|
Summary: [swift 2.0] Cancelled Requests in Firefox Account → [swift 2.0] Cancelled Requests in Firefox Account Login tests
Assignee | ||
Comment 1•9 years ago
|
||
I'm looking at this for a little while. Note for those who come after: the failing AccountsTest has been changed so it doesn't fail, but still needs attention.
Assignee: nobody → rnewman
Flags: needinfo?(rnewman)
Assignee | ||
Comment 2•9 years ago
|
||
I think we're not retaining the request somehow, and so it's deiniting, which cancels the session.
Assignee | ||
Comment 3•9 years ago
|
||
Yup, that's it. Each Client has its own Alamofire.Manager. We don't use the client once it kicks off its request, so it's automatically released. When it's released, it releases the Manager. The Manager's deinit cancels all outstanding requests. Threading the client back through the call stack makes this test pass. I'd like to find a neater solution :)
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Component: Build & Test → General
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8656153 -
Flags: review?(sleroux)
Assignee | ||
Updated•9 years ago
|
Hardware: Other → All
Assignee | ||
Updated•9 years ago
|
Attachment #8656153 -
Flags: review?(sleroux) → review?(etoop)
Reporter | ||
Updated•9 years ago
|
Attachment #8656153 -
Flags: review?(etoop) → review+
Assignee | ||
Comment 5•9 years ago
|
||
f80cd8d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-fxios-v1.0:
--- → ?
status-fxios-v1.0.5:
--- → ?
status-fxios-v1.1:
--- → fixed
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•