diff options
author | Florian Dold <florian@dold.me> | 2021-02-04 16:22:05 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-02-04 16:22:05 +0100 |
commit | 83937a7198c17b267714b159f0e616a2536264d3 (patch) | |
tree | 118f6681e575d055d24c7bbc2e82c4dbca1085a3 | |
parent | aa6cba1533dcef4b9db8836ccd1491f63edc496b (diff) |
per-test timeout
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/testrunner.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts index 0d5915737..455d8f451 100644 --- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts +++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts @@ -68,6 +68,7 @@ import CancellationToken from "cancellationtoken"; */ interface TestMainFunction { (t: GlobalTestState): Promise<void>; + timeoutMs?: number; } const allTests: TestMainFunction[] = [ @@ -199,9 +200,10 @@ export async function runTests(spec: TestRunSpec) { currentChild.stdout?.pipe(harnessLogStream); currentChild.stderr?.pipe(harnessLogStream); - const testTimeoutMs = 60000; + const defaultTimeout = 60000; + const testTimeoutMs = testCase.timeoutMs ?? defaultTimeout; - const { token } = CancellationToken.timeout(60000); + const { token } = CancellationToken.timeout(testTimeoutMs); const resultPromise: Promise<TestRunResult> = new Promise( (resolve, reject) => { |