enter image description here

CircleCI shows Too long with no output (exceeded 20m0s): context deadline exceeded Error when test is uploaded

I have rerun the tets cases but not worked.

1

There are 1 best solutions below

0
Malik Kulsoom On

Mostly this happens when you run your tests and they don’t close connections opened to servers/sockets etc. Could you provide more details about the type of tests you have written? But it’s worth checking the few Items:

When running tests locally do you see they finished running with following message? enter image description here

  • If Yes then the issue could be related to circle ci config
  • If No then your tests might be missing connection close to the server etc. It was the case with me and identified it when ran all describes one by one locally.

My Issue was: I had created a server instance in my before block but didn’t close it after the tests end

before(async () => {
  server = new MockServer();
  server.init(9004);
});
after(async () => {
  server.close(); // was missing this line
});

I hope it helps! If not you then maybe someone else!!