Skip to content

Commit

Permalink
Incorporate some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Jan 17, 2023
1 parent f88fdf1 commit 4c5f96d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function main() {
})
.option('use-source', {
descripton: 'Use TypeScript packages from the given source repository (or "auto")',
alias: 'S',
alias: 's',
type: 'string',
requiresArg: true,
})
Expand Down
2 changes: 0 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ export function integTest(
// jest and prints without a stack trace (if verbose: false).
// eslint-disable-next-line no-console
console.log(output.buffer().toString());
// await output.flushTo(process.stderr);
// process.stderr.write(`❌ ${e.toString()}\n`);
throw e;
}
}, timeoutMillis);
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class XpMutexPool {
return XpMutexPool.fromDirectory(path.join(os.tmpdir(), name));
}

private readonly queuedResolvers = new Set<() => void>();
private readonly waitingResolvers = new Set<() => void>();
private watcher: ReturnType<typeof watch> | undefined;

private constructor(public readonly directory: string) {
Expand All @@ -31,7 +31,7 @@ export class XpMutexPool {
*/
public awaitUnlock(maxWaitMs?: number): Promise<void> {
const wait = new Promise<void>(ok => {
this.queuedResolvers.add(async () => {
this.waitingResolvers.add(async () => {
await randomSleep(10);
ok();
});
Expand Down Expand Up @@ -67,10 +67,10 @@ export class XpMutexPool {
}

private notifyWaiters() {
for (const promise of this.queuedResolvers) {
for (const promise of this.waitingResolvers) {
promise();
}
this.queuedResolvers.clear();
this.waitingResolvers.clear();
}
}

Expand Down

0 comments on commit 4c5f96d

Please sign in to comment.