Skip to content

Commit 8113288

Browse files
authored
fix(ec2): timeout ssh tryKeyGen to avoid hanging #5951
## Problem Starting in #5936 some tests started expiring, since fixed in #5954. However, than expire, the `SshKeyPair` tests hang because they are stuck in a child process. This leads to these tests failing to timeout, even when exceeding the test timeout threshold. ## Solution Add explicit timeout on the child process we use to spawn ssh keys.
1 parent 30f9289 commit 8113288

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/awsService/ec2/sshKeyPair.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export class SshKeyPair {
8080
}
8181
return !(await tryRun('ssh-keygen', ['-t', keyType, '-N', '', '-q', '-f', keyPath], 'yes', 'unknown key type', {
8282
onStdout: overrideKeys,
83+
timeout: new Timeout(5000),
8384
}))
8485
}
8586

0 commit comments

Comments
 (0)