Hi folks, recently a lot of our CI runs have start...
# pact-js
g
Hi folks, recently a lot of our CI runs have started to fail with
The pact mock service wasn't running when addInteraction was called
and similar. Has something changed in the way the pact mock server works? This is on pretty standard React-based consumers.
y
There was a release 2 weeks ago, can you provide a bit more info please
g
We are using pact-jest, our tests are basically standard jest tests setup with `pactWith`:
Copy code
pactWith(buildPactConfigObject(), async (provider: any) => {
  beforeEach(() => {
    config.apiConfig.apiBaseUrl = provider.mockService.baseUrl
  })
And we’re running on Gitlab CI
Strangely, sometimes these tests pass, so it’s not like the mock service is never running, but they’ve become a lot more flaky recently.
y
Looks pretty green in CI, on GH actions. https://github.com/pact-foundation/jest-pact/actions I haven’t given jest-pact much love due to pact-js providing a better pact lifecycle since moving to the rust core, I think its probably superfluous. Are you testing a particular platform/arch combo or cross? Are you seeing errors on all of them. What is in the gl ci image? gl hosted, self hosted? node version. which pact version. Can you provide a simple example that reproduces the intermittent failure.
g
Sorry, I might not have followed all the recent developments. I’ll look into the pact-js docs.
Maybe we need to change the way we set up tests