Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,29 @@ jobs:
rm "$error_file"
exit 1
fi
repro:
name: Test issue repro
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Setup Node.JS
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.STABLE_NODE_VERSION }}
cache: npm
- name: Install root dependencies
run: npm ci

- name: replace libffi with patched version
run: |
curl -LO https://github.com/YOU54F/test/releases/download/0.0.0/libpact_ffi.so
mv libpact_ffi.so node_modules/@pact-foundation/pact-core-linux-x64-glibc/prebuilds/linux-x64/libpact_ffi.so

- name: Install and test examples
run: |
cd examples/http
npm i
REPRO_RUNS=20 npm run test:repro:repeat
34 changes: 34 additions & 0 deletions examples/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,37 @@ replaced the older object-literal style.
- [Pact provider verification](https://docs.pact.io/implementation_guides/javascript/docs/provider)
- [Matchers](https://docs.pact.io/implementation_guides/javascript/docs/matching)
- [Provider states](https://docs.pact.io/implementation_guides/javascript/docs/provider#provider-states)

## Flaky V4 Parallel-Load Repro

This example now includes a stress repro for an intermittent failure seen with
V4 `addInteraction().executeTest()` under high parallel CPU load.

Repro files live in `repro/`:

- `v4-execute-test-race.test.ts`: runs many sequential V4 `executeTest()`
interactions in one file.
- `cpu-pressure-*.test.ts`: many unrelated files that keep Vitest workers busy
and create parallel CPU pressure.
- `run-repro.mjs`: repeats the parallel repro command and reports flaky runs.

Run the repro in parallel mode (expected flaky mode when regression exists):

```bash
npm run test:repro
```

Run the same tests with file parallelism disabled (control mode):

```bash
npm run test:repro:serial
```

Repeat the parallel run many times to surface intermittent failures:

```bash
REPRO_RUNS=20 npm run test:repro:repeat
```

By default, `test:repro:repeat` treats this as flaky if at least one run fails
with text matching `expected request not received`.
Loading