diff --git a/src/api/.env.sample b/src/api/.env.sample index 7ebbe314f..c952237d7 100644 --- a/src/api/.env.sample +++ b/src/api/.env.sample @@ -1,4 +1,5 @@ VITE_SERVER= VITE_DB_USER= VITE_DB_PASS= -VITE_DB_PORT=22 \ No newline at end of file +VITE_DB_PORT=22 +#VITE_CONNECTION_TIMEOUT=25000 \ No newline at end of file diff --git a/src/api/tests/suites/connection.test.ts b/src/api/tests/suites/connection.test.ts index 91bc78a90..846d3256d 100644 --- a/src/api/tests/suites/connection.test.ts +++ b/src/api/tests/suites/connection.test.ts @@ -1,7 +1,7 @@ import { expect, describe, afterAll, beforeAll, it } from 'vitest' import { Tools } from '../../Tools'; -import { disposeConnection, newConnection } from '../connection'; +import { CONNECTION_TIMEOUT, disposeConnection, newConnection } from '../connection'; import IBMi from '../../IBMi'; import { getJavaHome } from '../../configuration/DebugConfiguration'; @@ -9,7 +9,7 @@ describe(`connection tests`, {concurrent: true}, () => { let connection: IBMi beforeAll(async () => { connection = await newConnection(); - }, 25000) + }, CONNECTION_TIMEOUT) afterAll(async () => { disposeConnection(connection); diff --git a/src/api/tests/suites/content.test.ts b/src/api/tests/suites/content.test.ts index 5edaa7fea..f49360d3c 100644 --- a/src/api/tests/suites/content.test.ts +++ b/src/api/tests/suites/content.test.ts @@ -5,13 +5,13 @@ import tmp from 'tmp'; import { Tools } from '../../Tools'; import { posix } from 'path'; import IBMi from '../../IBMi'; -import { newConnection, disposeConnection } from '../connection'; +import { newConnection, disposeConnection, CONNECTION_TIMEOUT } from '../connection'; describe('Content Tests', {concurrent: true}, () => { let connection: IBMi beforeAll(async () => { connection = await newConnection(); - }, 25000) + }, CONNECTION_TIMEOUT) afterAll(async () => { disposeConnection(connection); diff --git a/src/api/tests/suites/encoding.test.ts b/src/api/tests/suites/encoding.test.ts index a3fe2b123..de5bd03bb 100644 --- a/src/api/tests/suites/encoding.test.ts +++ b/src/api/tests/suites/encoding.test.ts @@ -3,7 +3,7 @@ import IBMi from "../../IBMi"; import { Tools } from "../../Tools"; import { IBMiObject } from "../../types"; import { describe, it, expect, afterAll, beforeAll } from 'vitest'; -import { newConnection, disposeConnection } from "../connection"; +import { newConnection, disposeConnection, CONNECTION_TIMEOUT } from "../connection"; const contents = { '37': [`Hello world`], @@ -43,7 +43,7 @@ describe('Encoding tests', {concurrent: true} ,() => { let connection: IBMi beforeAll(async () => { connection = await newConnection(); - }, 25000) + }, CONNECTION_TIMEOUT) afterAll(async () => { disposeConnection(connection); diff --git a/src/api/tests/suites/search.test.ts b/src/api/tests/suites/search.test.ts index 302aa84a1..ce918704c 100644 --- a/src/api/tests/suites/search.test.ts +++ b/src/api/tests/suites/search.test.ts @@ -2,13 +2,13 @@ import { describe, it, expect, afterAll, beforeAll } from 'vitest'; import { parseFilter } from '../../Filter'; import { Search } from '../../Search'; import IBMi from '../../IBMi'; -import { newConnection, disposeConnection } from '../connection'; +import { newConnection, disposeConnection, CONNECTION_TIMEOUT } from '../connection'; describe('Search Tests', {concurrent: true}, () => { let connection: IBMi beforeAll(async () => { connection = await newConnection(); - }, 25000) + }, CONNECTION_TIMEOUT) afterAll(async () => { disposeConnection(connection);