Skip to content

Commit

Permalink
fix test timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
hross committed Nov 26, 2019
1 parent ec5ac87 commit 9ef773f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/exec/__tests__/exec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ describe('@actions/exec', () => {
})

it('Handles child process holding streams open', async function() {
// this was timing out on some slower hosted macOS runs at default 5s
jest.setTimeout(10000)
const semaphorePath = path.join(
getTestTemp(),
'child-process-semaphore.txt'
Expand Down Expand Up @@ -332,11 +330,9 @@ describe('@actions/exec', () => {
).toBe(1)

fs.unlinkSync(semaphorePath)
})
}, 10000) // this was timing out on some slower hosted macOS runs at default 5s

it('Handles child process holding streams open and non-zero exit code', async function() {
// this was timing out on some slower hosted macOS runs at default 5s
jest.setTimeout(10000)
const semaphorePath = path.join(
getTestTemp(),
'child-process-semaphore.txt'
Expand Down Expand Up @@ -388,7 +384,7 @@ describe('@actions/exec', () => {
).toBe(1)

fs.unlinkSync(semaphorePath)
})
}, 10000) // this was timing out on some slower hosted macOS runs at default 5s

it('Handles child process holding streams open and stderr', async function() {
const semaphorePath = path.join(
Expand Down Expand Up @@ -646,8 +642,6 @@ describe('@actions/exec', () => {
// when using the windowsVerbatimArguments option. otherwise the target process
// interprets the args as starting after the first space in the tool path.

jest.setTimeout(10000) // test was timing out on slower windows runs

const exePath = compileArgsExe('print args exe with spaces.exe')
const args: string[] = ['myarg1 myarg2']
const outStream = new StringStream()
Expand All @@ -668,7 +662,7 @@ describe('@actions/exec', () => {
`[command]"${exePath}" myarg1 myarg2`
)
expect(output.trim()).toBe("args[0]: 'myarg1'\r\nargs[1]: 'myarg2'")
})
}, 10000) // slower windows runs timeout, so upping timeout to 10s (from default of 5s)

it('execs .cmd with a space and with verbatim args (Windows)', async () => {
// this test validates the quoting that tool runner adds around the script path.
Expand Down

0 comments on commit 9ef773f

Please sign in to comment.