Lab 7.1: validate.js timeout restriction too strict?
I just did Lab 7.1 and ran the tests with
node validate. I passed the first 6 test cases, and then the tests hung for 1.5 seconds (since one of the backend services is down), and then I get a failed assertion "GET http://localhost:3000/1 failed to respond". So I dug into
validate.js to figure out what was going on, changed line 27 (in the
get function) to timeout at 4 seconds instead of 1.5, and re-ran the tests, which then passed successfully.
Since the lab exercise did not mention that our "front of the back-end" service should forcibly cut the connection(s) to back-end services after a given time limit, I suppose that this is unintentional? In case it matters, I'm doing the lab exercises on Ubuntu 20.04 LTS.