Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(cactus-core): fix false negative test results
The fix was to start statically importing the http helper library we use in `packages/cactus-core/src/main/typescript/web-services/handle-rest-endpoint-exception.ts` instead of how it was (dynamic imports at runtime). 1. There have been reports of dynamic imports causing segmentation faults in the NodeJS process when Jest is involved. 2. It is looking like this bug was another instance of that manifesting but slightly differently because this time around Jest decided to hide the stack trace of it as well. 3. Because of `2)` we have no specific evidence of the theory. We can only say that the change in this commit made the problem go away, but since there never was any crash logs or stack traces on the CI environment, this remains a conjecture. 4. Trying to reproduce the issue locally failed even when using the exact same versions of NodeJS and npm (and all the dependencies of course). 5. Based on `4)` it is likely that the segmentation fault is due to a race condition in the lower level (C/C++) code of NodeJS and/or Jest. Fixes #2966 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information