New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-26203] Android: Prevent exception in Log for HTTP response #10175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: PASS
Yes, we should be able to write a test case for this
@ypbnv I mean does that manual test case you wrote above work to expose the issue and passes after the fix? If so, that's pretty easy to write up as a mocha test: describe('Ti.Network.HTTPClient', function () {
it('handles null input stream in response', function (finish) {
var url = "https://www.appcelerator.org/exit.xml";
var client = Ti.Network.createHTTPClient({
onload : function(e) {
finish(new Error('Expected network call to fail'));
},
onerror : function(e) {
// TODO: Test some of the event callback properties?
finish();
},
});
client.open('HEAD', url);
client.send();
});
}); |
@sgtcoolguy If I understand the test case you proposed right it will pass if the |
FR Passed. If Studio Ver: 5.1.0.201807181611 |
Generated by 🚫 dangerJS |
JIRA: https://jira.appcelerator.org/browse/TIMOB-26203
Description:
Guard for a
null
response from the server.Note: Can we have a unit test for that?
Test case: