Repository navigation
Fix flapping test-suite tests - #2610
Conversation
a7664b4 to
8057fbb
Compare
|
This PR changes the semantics of the |
| applyOperations(map, operations.slice(1), callback); | ||
| } | ||
| applyOperations(map, operations.slice(1), callback); | ||
| } catch (e) { |
There was a problem hiding this comment.
Wrapping callback() with a try/catch that also calls callback is dangerous -- if callback throws, it'll get called twice. What happens if we don't do any exception handling here?
There was a problem hiding this comment.
Good point. I will restructure to move callback out of the error handler.
What happens if we don't do any exception handling here?
If we don't do any error handling and there is a synchronous error (there were several in my testing) some global exception handler (not the default one) gets triggered. This handler is awful for debugging because it prints the error message (i.e. "undefined is not a function") without any stracktrace.
There was a problem hiding this comment.
It gets caught by the exception handler in map, emitted as an error event, and logged by the default handler. I guess this is a difference in how node and a browser handle console.log(error) -- the browser behavior of logging the stack trace being much more useful.
What about having suite_implementation.js bind an error handler that does more complete logging? This would be helpful in general for any time the test-suite happens to cause an error in gl-js internals.
|
Confirmed that this fixes test suite hangs for me. 👍 |
f24263c to
4f8ec43
Compare
|
@jfirebaugh 🚢 on 🍏? |
|
🚢 |
d25048c to
5ed4946
Compare
|
I fixed the new problem by setting |
cc @jfirebaugh