{"action":"created","issue":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1005","labels_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1005/labels{/name}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1005/comments","events_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1005/events","html_url":"https://github.com/Alamofire/Alamofire/issues/1005","id":126379041,"number":1005,"title":"Successhandler in Tests not called","user":{"login":"ogezue","id":2361031,"avatar_url":"https://avatars.githubusercontent.com/u/2361031?v=3","gravatar_id":"","url":"https://api.github.com/users/ogezue","html_url":"https://github.com/ogezue","followers_url":"https://api.github.com/users/ogezue/followers","following_url":"https://api.github.com/users/ogezue/following{/other_user}","gists_url":"https://api.github.com/users/ogezue/gists{/gist_id}","starred_url":"https://api.github.com/users/ogezue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogezue/subscriptions","organizations_url":"https://api.github.com/users/ogezue/orgs","repos_url":"https://api.github.com/users/ogezue/repos","events_url":"https://api.github.com/users/ogezue/events{/privacy}","received_events_url":"https://api.github.com/users/ogezue/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-13T09:41:58Z","updated_at":"2016-01-22T03:35:27Z","closed_at":"2016-01-22T03:35:27Z","body":"I'm using Alamofire 3.1.4 with Objectmapper and OHHTTPStub to test that my client is still compliant to the JSON format. The JSON-File is loaded from the Filesystem  by OHHTTPStub and mapped correctly. But Alamofire doesn't call the completion handler in this method because queue is nil I assume.\r\nDo you have an idea what is wrong?\r\n\r\n```\r\npublic func response<T: ResponseSerializerType>(\r\n        queue queue: dispatch_queue_t? = nil,\r\n        responseSerializer: T,\r\n        completionHandler: Response<T.SerializedObject, T.ErrorObject> -> Void)\r\n        -> Self\r\n    {\r\n        delegate.queue.addOperationWithBlock {\r\n            let result = responseSerializer.serializeResponse(\r\n                self.request,\r\n                self.response,\r\n                self.delegate.data,\r\n                self.delegate.error\r\n            )\r\n\r\n            dispatch_async(queue ?? dispatch_get_main_queue()) {\r\n                let response = Response<T.SerializedObject, T.ErrorObject>(\r\n                    request: self.request,\r\n                    response: self.response,\r\n                    data: self.delegate.data,\r\n                    result: result\r\n                )\r\n\r\n                completionHandler(response)\r\n            }\r\n        }\r\n\r\n        return self\r\n    }\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/comments/173795088","html_url":"https://github.com/Alamofire/Alamofire/issues/1005#issuecomment-173795088","issue_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/1005","id":173795088,"user":{"login":"jshier","id":51020,"avatar_url":"https://avatars.githubusercontent.com/u/51020?v=3","gravatar_id":"","url":"https://api.github.com/users/jshier","html_url":"https://github.com/jshier","followers_url":"https://api.github.com/users/jshier/followers","following_url":"https://api.github.com/users/jshier/following{/other_user}","gists_url":"https://api.github.com/users/jshier/gists{/gist_id}","starred_url":"https://api.github.com/users/jshier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshier/subscriptions","organizations_url":"https://api.github.com/users/jshier/orgs","repos_url":"https://api.github.com/users/jshier/repos","events_url":"https://api.github.com/users/jshier/events{/privacy}","received_events_url":"https://api.github.com/users/jshier/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T03:35:27Z","updated_at":"2016-01-22T03:35:27Z","body":"The line `queue ?? dispatch_get_main_queue()` uses Swift's nil coalescing operator, [as described in Swift's documentation](https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/BasicOperators.html), to use the main queue if none is provided. We also have many tests around this feature and in fact the library wouldn't even function if the completion handler was never called. So it's likely this is an issue with your code, in which case you'll likely have better luck finding a solution using StackOverflow and tagging Alamofire, as recommended by our Contributing document. If you do think you've found a bug in the library, feel free to open another issue with code that shows the bug.\r\n\r\n## Asking Questions\r\n\r\nWe don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on [Stack Overflow](https://stackoverflow.com) instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others."}}