Skip to content

Commit

Permalink
fix: set process.stdout._handle.setBlocking(true) on ffi init
Browse files Browse the repository at this point in the history
fixes pact-foundation/pact-js#1216

Large number of pact verifications fail when run in parallel
  • Loading branch information
YOU54F committed May 28, 2024
1 parent 3515c11 commit b0409f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ffi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ let ffi: typeof ffiLib;
let ffiLogLevel: LogLevel;

const initialiseFfi = (logLevel: LogLevel): typeof ffi => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (process.stdout._handle) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
process.stdout._handle.setBlocking(true);
}
logger.debug(`Initalising native core at log level '${logLevel}'`);
ffiLogLevel = logLevel;
try {
Expand Down

0 comments on commit b0409f4

Please sign in to comment.