Skip to content

test: Set per-test timeout #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"test": "./node_modules/mocha/bin/mocha --recursive test/unit",
"test-integration": "./node_modules/mocha/bin/mocha --timeout 5s test/functional/*.js",
"test-integration": "./node_modules/mocha/bin/mocha test/functional/*.js",
"lint": "./node_modules/eslint/bin/eslint.js lib/ test/",
"release": "standard-version"
},
Expand Down
3 changes: 3 additions & 0 deletions test/functional/CommandCallFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('CommandCall Functional Tests', function () {
});

describe('CL command tests', function () {
this.timeout(3680);
it('calls CL command', function (done) {
const connection = new Connection(config);
connection.add(new CommandCall({ command: 'RTVJOBA USRLIBL(?) SYSLIBL(?)', type: 'cl' }));
Expand All @@ -42,6 +43,7 @@ describe('CommandCall Functional Tests', function () {
});

describe('SH command tests', function () {
this.timeout(5970);
it('calls PASE shell command', function (done) {
const connection = new Connection(config);
connection.add(new CommandCall({ command: 'system -i wrksyssts', type: 'sh' }));
Expand All @@ -59,6 +61,7 @@ describe('CommandCall Functional Tests', function () {
});

describe('QSH command tests', function () {
this.timeout(6600);
it('calls QSH command', function (done) {
const connection = new Connection(config);
connection.add(new CommandCall({ command: 'system wrksyssts', type: 'qsh' }));
Expand Down
1 change: 1 addition & 0 deletions test/functional/ProgramCallFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('ProgramCall Functional Tests', function () {
});

describe('Test ProgramCall()', function () {
this.timeout(2800);
it('calls QWCRSVAL program checks if it ran successfully', function (done) {
const connection = new Connection(config);

Expand Down
3 changes: 3 additions & 0 deletions test/functional/deprecated/commandsFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe('iSh, iCmd, iQsh, Functional Tests', function () {
});

describe('iCmd()', function () {
this.timeout(1124);
it('calls CL command', function (done) {
const connection = new iConn(database, username, password, restOptions);
connection.add(iCmd('RTVJOBA USRLIBL(?) SYSLIBL(?)'));
Expand All @@ -64,6 +65,7 @@ describe('iSh, iCmd, iQsh, Functional Tests', function () {
});

describe('iSh()', function () {
this.timeout(3450);
it('calls PASE shell command', function (done) {
const connection = new iConn(database, username, password, restOptions);
connection.add(iSh('system -i wrksyssts'));
Expand All @@ -80,6 +82,7 @@ describe('iSh, iCmd, iQsh, Functional Tests', function () {
});

describe('iQsh()', function () {
this.timeout(6244);
it('calls QSH command', function (done) {
const connection = new iConn(database, username, password, restOptions);
connection.add(iQsh('system wrksyssts'));
Expand Down
5 changes: 5 additions & 0 deletions test/functional/deprecated/iDataQueueFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const lib = 'NODETKTEST'; const dqName = 'TESTQ';

describe('iDataQueue Functional Tests', function () {
before('check if data queue exists for tests', function (done) {
this.timeout(0);
printConfig();
checkObjectExists(config, dqName, '*DTAQ', (error) => {
if (error) { throw error; }
Expand All @@ -54,6 +55,7 @@ describe('iDataQueue Functional Tests', function () {
});

describe('constructor', function () {
this.timeout(2);
it('creates and returns an instance of iDataQueue', function () {
const connection = new iConn(database, config.user, password);

Expand All @@ -63,6 +65,7 @@ describe('iDataQueue Functional Tests', function () {
});

describe('sendToDataQueue', function () {
this.timeout(693);
it('sends data to specified DQ', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -76,6 +79,7 @@ describe('iDataQueue Functional Tests', function () {
});

describe('receiveFromDataQueue', function () {
this.timeout(712);
it('receives data from specfied DQ', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -89,6 +93,7 @@ describe('iDataQueue Functional Tests', function () {
});

describe('clearDataQueue', function () {
this.timeout(720);
it('clears the specifed DQ', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
3 changes: 3 additions & 0 deletions test/functional/deprecated/iNetworkFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('iNetwork Functional Tests', function () {
});

describe('constructor', function () {
this.timeout(2);
it('creates and returns an instance of iNetwork', function () {
const connection = new iConn(database, config.user, password);

Expand All @@ -57,6 +58,7 @@ describe('iNetwork Functional Tests', function () {
});

describe('getTCPIPAttr', function () {
this.timeout(814);
it('retrieves TCP/IP Attributes', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -99,6 +101,7 @@ describe('iNetwork Functional Tests', function () {
});

describe('getNetInterfaceData', function () {
this.timeout(810);
it('retrieves IPv4 network interface info', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
7 changes: 7 additions & 0 deletions test/functional/deprecated/iObjFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('iObj Functional Tests', function () {
});

describe('retrUsrAuth', function () {
this.timeout(652);
it(`returns uses's authority for an object using ${config.transport} tranport`, function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -101,6 +102,7 @@ describe('iObj Functional Tests', function () {
});

describe('rtrCmdInfo', function () {
this.timeout(640);
it('returns command info', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -153,6 +155,7 @@ describe('iObj Functional Tests', function () {
});

describe('retrPgmInfo', function () {
this.timeout(714);
it('returns program info', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -227,6 +230,7 @@ describe('iObj Functional Tests', function () {
});

describe('retrSrvPgmInfo', function () {
this.timeout(686);
it('returns service program info', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -282,6 +286,7 @@ describe('iObj Functional Tests', function () {
});

describe('retrUserInfo', function () {
this.timeout(712);
it('returns specified user profile info', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -308,6 +313,7 @@ describe('iObj Functional Tests', function () {
});

describe('retrUsrAuthToObj', function () {
this.timeout(648);
it(`retrieves info for users who are authorized to an object using ${config.transport} transpsort`, function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -335,6 +341,7 @@ describe('iObj Functional Tests', function () {
});

describe('addToLibraryList', function () {
this.timeout(634);
it('appends lib to user\'s lib list', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
1 change: 1 addition & 0 deletions test/functional/deprecated/iPgmFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('iPgm Functional Tests', function () {
});

describe('Test iPgm()', function () {
this.timeout(670);
it('calls QWCRSVAL program checks if it ran successfully', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
4 changes: 4 additions & 0 deletions test/functional/deprecated/iProdFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('iProd Functional Tests', function () {
});

describe('constructor', function () {
this.timeout(2);
it('creates and returns an instance of iProd', function () {
const connection = new iConn(database, config.user, password);

Expand All @@ -57,6 +58,7 @@ describe('iProd Functional Tests', function () {
});

describe('getPTFInfo', function () {
this.timeout(696);
it('returns info for specified ptf', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -99,6 +101,7 @@ describe('iProd Functional Tests', function () {
});

describe('getProductInfo', function () {
this.timeout(636);
it('returns info for specified product', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -130,6 +133,7 @@ describe('iProd Functional Tests', function () {
// REST transport currently failing with 414 URI Too Long response code
// The requested URL's length exceeds the capacity limit for this server
describe('getInstalledProducts', function () {
this.timeout(3566);
it('returns info for installed products', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
12 changes: 12 additions & 0 deletions test/functional/deprecated/iSqlFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('iSql Functional Tests', function () {
});

describe('prepare & execute', function () {
this.timeout(1370);
it('prepares & executes stored procedure then fetch results', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -80,6 +81,7 @@ describe('iSql Functional Tests', function () {
});

describe('addQuery & fetch', function () {
this.timeout(926);
it('runs a query and fetches results', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -105,6 +107,7 @@ describe('iSql Functional Tests', function () {
});

describe('added test to ensure issue #11 was resolved', function () {
this.timeout(1152);
it('should parse SQL result set empty data tags correctly', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -131,6 +134,7 @@ describe('iSql Functional Tests', function () {
});

describe('tables', function () {
this.timeout(954);
it('returns meta data for specified table', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -155,6 +159,7 @@ describe('iSql Functional Tests', function () {
});

describe('tablePriv', function () {
this.timeout(978);
it('returns privilege data for a table', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -181,6 +186,7 @@ describe('iSql Functional Tests', function () {
});

describe('columns', function () {
this.timeout(1038);
it('returns meta data for a column', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -218,6 +224,7 @@ describe('iSql Functional Tests', function () {
});

describe('columnPriv', function () {
this.timeout(952);
it('returns privilege data for a column', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -246,6 +253,7 @@ describe('iSql Functional Tests', function () {
});

describe('procedures', function () {
this.timeout(948);
it('returns meta data on for a procedure', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -273,6 +281,7 @@ describe('iSql Functional Tests', function () {
});

describe('pColumns', function () {
this.timeout(970);
it('returns meta data for procedure column', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -311,6 +320,7 @@ describe('iSql Functional Tests', function () {
});

describe('primaryKeys', function () {
this.timeout(936);
it('returns meta data for a primary key', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -336,6 +346,7 @@ describe('iSql Functional Tests', function () {
});

describe('foreignKeys', function () {
this.timeout(934);
it('returns meta data for a foreign key', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down Expand Up @@ -370,6 +381,7 @@ describe('iSql Functional Tests', function () {
});

describe('statistics', function () {
this.timeout(1696);
it('returns stats info for table', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
5 changes: 5 additions & 0 deletions test/functional/deprecated/iUserSpaceFunctional.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('iUserSpace Functional Tests', function () {
});

describe('constructor', function () {
this.timeout(2);
it('returns an instance of iUserSpace', function () {
const connection = new iConn(database, config.user, password);

Expand All @@ -59,6 +60,7 @@ describe('iUserSpace Functional Tests', function () {
});

describe('createUserSpace', function () {
this.timeout(702);
it('creates a user space', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -77,6 +79,7 @@ describe('iUserSpace Functional Tests', function () {
});

describe('setUserSpaceData', function () {
this.timeout(632);
it('sets data within the user space', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -95,6 +98,7 @@ describe('iUserSpace Functional Tests', function () {
});

describe('getUserSpaceData', function () {
this.timeout(632);
it('returns specified length of data', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand All @@ -110,6 +114,7 @@ describe('iUserSpace Functional Tests', function () {
});

describe('deleteUserSpace', function () {
this.timeout(628);
it('removes a user space', function (done) {
const connection = new iConn(database, username, password, restOptions);

Expand Down
Loading