TheWoodenMan/behavioural-recruitment

GET /questionList should return questionList.ejs but throws: "Exceeded timeout of 20000 ms for a test.

TheWoodenMan opened this issue · 1 comments

on deployment to azure questionList throws errors related to the length of time it takes to get information back from the DB

Load Pages › GET /questionList should return questionList.ejs

    thrown: "Exceeded timeout of 20000 ms for a test.
    Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

      26 | 			.end(done);
      27 | 	});
    > 28 | 	test("GET /questionList should return questionList.ejs", (done) => {
         | 	^
      29 | 		const res = request(app.server)
      30 | 			.get("/questionList")
      31 | 			.expect("Content-Type", /text\/html/)

      at test (server.test.js:28:2)
      at Object.describe (server.test.js:6:1)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 19 passed, 20 total
Snapshots:   0 total
Time:        21.703 s
Ran all test suites.
Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
Error: Process completed with exit code 1.

curiously, these tests pass locally so will need to be inspected more closely to determine the source of the error w.r.t azure settings

This was eventually removed from the API due to not being scaleable.