Skip to content

Commit

Permalink
Use variable for timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
  • Loading branch information
worksofliam committed Jan 22, 2025
1 parent 005aeed commit 19a2673
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/api/.env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VITE_SERVER=
VITE_DB_USER=
VITE_DB_PASS=
VITE_DB_PORT=22
VITE_DB_PORT=22
#VITE_CONNECTION_TIMEOUT=25000
4 changes: 2 additions & 2 deletions src/api/tests/suites/connection.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

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';

describe(`connection tests`, {concurrent: true}, () => {
let connection: IBMi
beforeAll(async () => {
connection = await newConnection();
}, 25000)
}, CONNECTION_TIMEOUT)

afterAll(async () => {
disposeConnection(connection);
Expand Down
4 changes: 2 additions & 2 deletions src/api/tests/suites/content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/api/tests/suites/encoding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`],
Expand Down Expand Up @@ -43,7 +43,7 @@ describe('Encoding tests', {concurrent: true} ,() => {
let connection: IBMi
beforeAll(async () => {
connection = await newConnection();
}, 25000)
}, CONNECTION_TIMEOUT)

afterAll(async () => {
disposeConnection(connection);
Expand Down
4 changes: 2 additions & 2 deletions src/api/tests/suites/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 19a2673

Please sign in to comment.