Skip to content

Commit

Permalink
fix: set process.stdout._handle.setBlocking(true) on ffi init (#510)
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 authored May 29, 2024
1 parent 3515c11 commit af76abd
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 af76abd

Please sign in to comment.