These are chat archives for esp8266/Arduino

5th
Nov 2018
liebman
@liebman
Nov 05 2018 00:24
Ok, found the issues with the http_client device tests. One issue is that they are using the old API, but that is not whats failing. The first failure is that one of the tests expects to post twice on an http client, but calls end() in between and that deletes the client forcing the second request to crash. The other issue is a later test that runs a get via https - but stops with 'please start sntp first !’. I’ll try to put together a PR to update these to mostly working.
Develo
@devyte
Nov 05 2018 01:47
@Makuna also no idea, that was implemented before my time. It's also possible that Arduino defaults changed in the meantime since it was implemented on our end.
Whatever else, our defaults shouldn't be changed until the next major release, or it could break who knows what out there.
Michael Miller
@Makuna
Nov 05 2018 06:30
@liebman Could be that test was to make sure it doesn't crash, and the new code is handling it correctly?
liebman
@liebman
Nov 05 2018 12:49
@Makuna Yes but a question is should the semantics of end have changed? If teh test ever worked then teh sequence of begin();POST();end()POST(); used to work. It no longer does. Now I think it needs begin();POST();end();begin();POST();.
Michael Miller
@Makuna
Nov 05 2018 18:35
I was thinking along the lines that maybe the test was checking for a "poorly written" sketch that called post after the end, it should do nothing but return an error but no crash; but now it crashes?
liebman
@liebman
Nov 05 2018 19:50
Th code comment is '// can do two POST requests with one HTTPClient object (#1902)’ pointing at: esp8266/Arduino#1902
(but I agree should not be able to call after end without a new begin)
and the test expects an OK from the second call...
Develo
@devyte
Nov 05 2018 23:18
@liebman Yeah, no. It should not work end()
liebman
@liebman
Nov 05 2018 23:36
@devyte Confirming what you said - using an HTTPClient should not work after end() without another begin() correct?