IGNITE-17389 Increase test node startup timeout
diff --git a/README.md b/README.md index 13d2cc0..5cf5d1f 100644 --- a/README.md +++ b/README.md
@@ -25,6 +25,8 @@ ```bash cd nodejs-thin-client +npm install +npm run build npm link npm link apache-ignite-client #linking examples (optional) ```
diff --git a/package.json b/package.json index 57082ea..f46876d 100644 --- a/package.json +++ b/package.json
@@ -36,7 +36,7 @@ "devDependencies": { "jasmine": "3.6.2", "jasmine-expect": "5.0.0", - "jasmine-reporters": "2.3.2", + "jasmine-reporters": "2.5.0", "ps-tree": "1.2.0", "process-exists": "4.0.0", "glob": "7.1.6",
diff --git a/spec/TestingHelper.js b/spec/TestingHelper.js index 83b2c8c..7fa1c0d 100644 --- a/spec/TestingHelper.js +++ b/spec/TestingHelper.js
@@ -297,7 +297,7 @@ while (!await cond()) { if (Date.now() - startTime > timeout) { - throw 'Failed to achive condition within timeout ' + timeout; + throw 'Failed to achieve condition within timeout ' + timeout; } await TestingHelper.sleep(100); @@ -348,7 +348,7 @@ throw 'Unexpected log file for node ' + idx; if (needLogging) { - if (logs.length != 1) + if (logs.length !== 1) throw 'Unexpected number of log files for node ' + idx + ': ' + logs.length; TestingHelper._logReaders.set(idx, new LogReader(logs[0])); @@ -386,16 +386,18 @@ } static killNode(proc) { + TestingHelper.logDebug('Killing Ignite process: ' + proc.pid); if (TestingHelper.isWindows()) { child_process.spawnSync('taskkill', ['/F', '/T', '/PID', proc.pid.toString()]) } psTree(proc.pid, function (err, children) { children.map((p) => { + TestingHelper.logDebug('Killing Ignite process child: ' + p.PID); try { process.kill(p.PID, 'SIGKILL'); } catch (_error) { - // No-op. + TestingHelper.logDebug('Can not kill Ignite process child: ' + _error.toString()); } }); }); @@ -516,7 +518,7 @@ }); const started = await TestingHelper.waitForCondition(async () => - TestingHelper.tryConnectClient(idx), 10000); + TestingHelper.tryConnectClient(idx), 30000); if (!started) { await TestingHelper.killNodeAndWait(srv);