Troubleshooting CI failures in cc mocha tests.
Mocha can timeout before the python setup script is complete. In this case, mocha timeout will not kill hte py process.
Ensure the child process is killed at the end of all tests in a file.
Differential D15557
[chronik-client] Set mocha timeout based on rpc timeout bytesofman on Feb 26 2024, 23:31. Authored by
Details
Troubleshooting CI failures in cc mocha tests. Mocha can timeout before the python setup script is complete. In this case, mocha timeout will not kill hte py process. Ensure the child process is killed at the end of all tests in a file. CI or see D14915 for build instructions
Diff Detail
Event TimelineComment Actions The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience. Comment Actions The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience. Comment Actions The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience. Comment Actions The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience. Comment Actions I get the idea: there is no timeout callback on mocha so we define our own that will trigger prior to mocha. This is clever, as there is probably no much we can do with mocha itself. Here are the steps that can be done to achieve this:
Comment Actions pass test info in single msg, exit in error condition on timeout exit, update margin for timeout exit to 5s and not 100ms Comment Actions
The timeout set in the test will override the global timeout. We can disable the global timeout by setting it to zero, but imo we should keep something there to handle tests that have not covered it (e.g. npm run test). Note that the global timeout does cover things like before() in this test, where we have not yet set the test timeout.
Comment Actions Add log statement when mocha tests exit due to mocha timeout, add more logic to setup_test_info function
Comment Actions
That means that we have the logged data not destroyed, which is what we want Comment Actions superseded by D15585
|