camunda/camunda-8-js-sdk

Test failures on Windows / Windows Support

Opened this issue · 6 comments

Intermittently, the Windows runner will fail the self-signed certificate test with the REST client.

Re-running the test causes it to pass.

FAIL src/__tests__/lib/GetCustomCertificateBuffer.unit.spec.ts (11.091 s)
  × Can use a custom root certificate to connect to a REST API (192 ms)
  × gRPC server with self-signed certificate (5002 ms)
  × gRPC server with self-signed certificate provided via string (5002 ms)
  ● Can use a custom root certificate to connect to a REST API
    RequestError: self-signed certificate
      at ClientRequest.<anonymous> (node_modules/got/dist/source/core/index.js:970:111)
      at ClientRequest.origin.emit (node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)

This is really strange. This test runs multiple times in isolated containers during a Pull Request test run. In one container in passes, in another, it doesn't pass.....

I've made a change to the test, testing a different error for Windows. I've also added some debugging console logs to try to isolate it further when it happens.

One thing is that the containers do differ between test runs. Sometimes the Linux containers fail immediately because Docker is not installed. That's more infrequent, but it demonstrates that the test environment is not stable and consistent.

#156

Still failing intermittently. I'm going to modify the test to log out the certificates that get loaded every time, so that in a failed test run I can see if any certificates were loaded.

I changed the self-signed cert in the REST API server. It still fails intermittently.

For example, on a single run it passed in one Windows container when run as part of the SaaS integration tests, but failed in another container when run as part of the unit tests.

On another run, it passed on both.

I'm leaning toward something in the container configuration being the culprit.

This has become consistent. It fails every time now.

I am going to disable testing on Windows for the time being, until I get some cycles to address this.