From 6d39c2b059b96dbb87ef49b55206146737c915d6 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Sun, 8 May 2022 08:13:54 +0100 Subject: [PATCH] Change e2e timeouts - Relates #401 --- e2e/spring-shell-e2e-tests/src/utils.ts | 1 + .../test/builtin.test.ts | 43 +++++++++++-------- e2e/spring-shell-e2e-tests/test/flow.test.ts | 43 +++++++++++-------- 3 files changed, 53 insertions(+), 34 deletions(-) diff --git a/e2e/spring-shell-e2e-tests/src/utils.ts b/e2e/spring-shell-e2e-tests/src/utils.ts index c80cf710..da9807b5 100644 --- a/e2e/spring-shell-e2e-tests/src/utils.ts +++ b/e2e/spring-shell-e2e-tests/src/utils.ts @@ -18,3 +18,4 @@ export const nativeCommand = cliPath; export const jarOptions = ['-jar', jarPath]; export const waitForExpectDefaultTimeout = 10000; export const waitForExpectDefaultInterval = 100; +export const testTimeout = 20000; diff --git a/e2e/spring-shell-e2e-tests/test/builtin.test.ts b/e2e/spring-shell-e2e-tests/test/builtin.test.ts index 33aa4780..6f1f8fe4 100644 --- a/e2e/spring-shell-e2e-tests/test/builtin.test.ts +++ b/e2e/spring-shell-e2e-tests/test/builtin.test.ts @@ -8,7 +8,8 @@ import { nativeCommand, jarOptions, waitForExpectDefaultTimeout, - waitForExpectDefaultInterval + waitForExpectDefaultInterval, + testTimeout } from '../src/utils'; // all buildin commands @@ -34,11 +35,11 @@ describe('builtin commands', () => { beforeEach(async () => { waitForExpect.defaults.timeout = waitForExpectDefaultTimeout; waitForExpect.defaults.interval = waitForExpectDefaultInterval; - }, 300000); + }, testTimeout); afterEach(async () => { cli?.dispose(); - }, 100000); + }, testTimeout); /** * native commands @@ -48,13 +49,17 @@ describe('builtin commands', () => { command = nativeCommand; }); - it(versionReturnsInfoDesc, async () => { - cli = new Cli({ - command: command, - options: [...options, ...versionCommand] - }); - await versionReturnsInfo(cli); - }); + it( + versionReturnsInfoDesc, + async () => { + cli = new Cli({ + command: command, + options: [...options, ...versionCommand] + }); + await versionReturnsInfo(cli); + }, + testTimeout + ); }); /** @@ -66,12 +71,16 @@ describe('builtin commands', () => { options = jarOptions; }); - it(versionReturnsInfoDesc, async () => { - cli = new Cli({ - command: command, - options: [...options, ...versionCommand] - }); - await versionReturnsInfo(cli); - }); + it( + versionReturnsInfoDesc, + async () => { + cli = new Cli({ + command: command, + options: [...options, ...versionCommand] + }); + await versionReturnsInfo(cli); + }, + testTimeout + ); }); }); diff --git a/e2e/spring-shell-e2e-tests/test/flow.test.ts b/e2e/spring-shell-e2e-tests/test/flow.test.ts index bf756173..97a24025 100644 --- a/e2e/spring-shell-e2e-tests/test/flow.test.ts +++ b/e2e/spring-shell-e2e-tests/test/flow.test.ts @@ -8,7 +8,8 @@ import { nativeCommand, jarOptions, waitForExpectDefaultTimeout, - waitForExpectDefaultInterval + waitForExpectDefaultInterval, + testTimeout } from '../src/utils'; // all flow commands @@ -56,11 +57,11 @@ describe('flow commands', () => { beforeEach(async () => { waitForExpect.defaults.timeout = waitForExpectDefaultTimeout; waitForExpect.defaults.interval = waitForExpectDefaultInterval; - }, 300000); + }, testTimeout); afterEach(async () => { cli?.dispose(); - }, 100000); + }, testTimeout); /** * native commands @@ -70,13 +71,17 @@ describe('flow commands', () => { command = nativeCommand; }); - it(flowConditionalField2SkipsFields1Desc, async () => { - cli = new Cli({ - command: command, - options: [...options, ...flowConditionalCommand] - }); - await flowConditionalField2SkipsFields1(cli); - }); + it( + flowConditionalField2SkipsFields1Desc, + async () => { + cli = new Cli({ + command: command, + options: [...options, ...flowConditionalCommand] + }); + await flowConditionalField2SkipsFields1(cli); + }, + testTimeout + ); }); /** @@ -88,12 +93,16 @@ describe('flow commands', () => { options = jarOptions; }); - it(flowConditionalField2SkipsFields1Desc, async () => { - cli = new Cli({ - command: command, - options: [...options, ...flowConditionalCommand] - }); - await flowConditionalField2SkipsFields1(cli); - }); + it( + flowConditionalField2SkipsFields1Desc, + async () => { + cli = new Cli({ + command: command, + options: [...options, ...flowConditionalCommand] + }); + await flowConditionalField2SkipsFields1(cli); + }, + testTimeout + ); }); });